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 doing 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.
These are subtypes of Number . A new Void class has also been added for completeness, and is used by the reflection methods to represent void return types. The API for writing C implementations of Java methods is now completely different. The mapping has been regularized, and is less tied to a particular implementation of the Java Virtual Machine. The general comments about native method mappings in Appendix A are still valid, but the specific details described, while still supported, are strongly deprecated.