by<br /> Vignesh
Originally posted by vigneswaran sathischandrababu:
using java.lang.reflect.Fields we can access the Class variables dynamically
But i want to access the members of Interface dynamically
give the correct Solution
Cheers, Martijn,
Twitter.
by<br /> Vignesh
Originally posted by Martijn Verburg:
Interfaces typically only have public static constants declared in them as members
by<br /> Vignesh
by<br /> Vignesh
Originally posted by Vignesh:
i can't do the same
because for Class, field.get(object) is the method of accessing members
but for Interface how can i create the Object....
Is there any way... ?
Joanne
by<br /> Vignesh
Originally posted by Vignesh:
Actually i will put lot of variables in the Interface.
Dynamically i want to load some variables into one Map depends on one Input value. If i got anyoher input i want to load some other variables into Map.
by<br /> Vignesh
Originally posted by Adeel Ansari:
Fields in interfaces are not, typically, static, they are final.
[ August 27, 2008: Message edited by: Adeel Ansari ]
Cheers, Martijn,
Twitter.
Joanne
Originally posted by Adeel Ansari:
Fields in interfaces are not, typically, static, they are final.
Originally posted by Ernest Friedman-Hill:
Quite wrong, I'm afraid. Fields in interfaces are always implicitly both static and final, whether you declare them so or not.
Cheers, Martijn,
Twitter.
Originally posted by Ernest Friedman-Hill:
Quite wrong, I'm afraid. Fields in interfaces are always implicitly both static and final, whether you declare them so or not.
by<br /> Vignesh
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Martijn Verburg:
Cripes, I had totally missed that. Once more I am humbled on a forum site, back to basics for this so called 'experienced' Java Dev
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|