reflection : Java Glossary

home page R words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2010 Roedy Green, Canadian Mind Products
reflection
Reflection (the java.lang.reflect package) is primarily for very generic programs such as database browsers or visual code editors. Reflection allows Java code to discover information about the fields, methods and constructors of loaded classes and to dynamically invoke them. Reflection is for dealing with class files you know very little about ahead of time. It would be of interest for example to the author of a BeanBox editor to import various foreign beans.
Sun’s JDK Technote Guide on Reflection : available:

Here

Reflection has very high overhead. Make sure you can’t solve your problem with a simple interface, Class.forName and a delegate object instead.

Kataba has a way of speeding up reflection 100x to almost the speed of interface calls via dynamic compliation (JVM byte code generation).

Learning More

Sun’s Javadoc on java.lang.reflect package : available:
Sun’s Javadoc on Proxy class : available:
introspection
JASM if you want to create class files on the fly
Kataba
on the fly compose, compile and run

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/reflection.html J:\mindprod\jgloss\reflection.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.110]
You are visitor number 29,962.