This is a tool for examining classes fully. A Class object can now return a list of all the public methods and fields of the related class. You can use the Method objects returned to invoke methods, and the Field objects to get and set field values. A Class object can also return a list of all members, including non-public ones, but security restrictions usually prevent this. You should avoid the temptation to use reflection when other tools more natural to the language would suffice.
Reflection is intended for use by language tools such as debuggers and class browsers.
Because Java code can be downloaded and run securely, RMI lets you pass subtypes of the declared method parameters, and return subtypes of the declared type of the remote method. This allows you to pass object behavior as well as simple values. RMI provides remote procedure calls with a Java flavor and benefits. See the next page for information about classes and interfaces that were added to the original eight java.