Any one tell us how to work reflection in java
it is also worth noting that it is best to cache your reflection results as much as possible to avoid additional overhead of looking up the methods and fields and so on
mostly you need to cache Method and Field, and maybe some other stuff i cannot remember at the moment
think of it as equivilant of lazy linking in the linker
where Reflection can be akin to the dynamic linker
classes, methods, fields and so on can be akin to the objects and symbols that the linker needs to map and link together (the linker does this ONCE, and ONLY ONCE unless the library is unloaded and loaded again,
HOWEVER it MIGHT be smart enough to cache this map for a period of time instead of just deleting the map when ever the library gets unloaded
caching the map avoids work when quickly unloading and reloading the same library, in which the map will be deleted after x amount of time has passed in order to save memory)
but in java, classes ONLY get unloaded under very specific cases
so it is always a good idea to cache your results and then recache them if your class gets reloaded by using static initializers