May 2001
Intermediate to advanced
1088 pages
30h 13m
English
The Reflection classes, for the most part, represent parts of a class. The main classes, found in the java.lang.reflect package, are Field, Method, Constructor, Modifier, and Array. There are also some other support classes that you will learn about shortly. You access the Reflection classes through a Class object, which you can get by calling either Class.forName or getClass on an object.
Listing 39.1 defines a simple Person class that can be used to demonstrate Reflection.
package usingj2ee.reflect; public class Person implements java.io.Serializable { public String firstName; public String middleName; public String lastName; public Person() { } public Person(String ... |
Read now
Unlock full access