reflection : Java Glossary
home R words local find no local find frame, full screen Google search web for topic jump to footer translate with Babelfish by Roedy Green ©1996-2008 Canadian Mind Products
Go to : 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)
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 is a simple example of how it works:

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 the 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
CMP logo
feedback Please email your feedback for publication, errors, omissions, broken/redirected link reports
and suggestions to improve this page to Roedy Green : feedback email
made with CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[65.110.21.43]
Your face IP:[38.103.63.18] The information on this page is for non-military use only.
You are visitor number 24,560. Military use includes use by defence contractors.
You can get a fresh copy of this page from: or possibly from your local J: drive (Java virtual drive/Mindprod website mirror)
http://mindprod.com/jgloss/reflection.html J:\mindprod\jgloss\reflection.html