Mega Code Archive

 
Categories / Java Book / 008 Reflection
 

0409 Class Reflection

Instances of the class Class represent classes and interfaces. An enum is a kind of class and an annotation is a kind of interface. Every array belongs to a class. Get Class from class name static Class<?> forName(String className) Returns the Class object associated with the class or interface with the given string name. static Class<?> forName(String name, boolean initialize, ClassLoader loader) Returns the Class object associated with the class or interface with the given string name, using the given class loader.