com.sun.tdk.signaturetest.loaders
Class ReflClassDescrLoader

java.lang.Object
  extended by com.sun.tdk.signaturetest.loaders.ReflClassDescrLoader
All Implemented Interfaces:
ClassDescriptionLoader

public class ReflClassDescrLoader
extends java.lang.Object
implements ClassDescriptionLoader

ReflClassDescrLoader is intended to compile information about classes via reflections package. If available, the advanced method Class.forName(String,boolean,ClassLoader) is involved, which enables to do not initialize classes being loaded. (This helps to avoid irrelevant security problems.)

See Also:
ClassDescription

Field Summary
static boolean debug
           
 
Constructor Summary
ReflClassDescrLoader()
          Adjust new ReflClassDescLoader instance.
 
Method Summary
 ClassDescription load(java.lang.String name)
          Return new ClassDescription for that class found by the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public static boolean debug
Constructor Detail

ReflClassDescrLoader

public ReflClassDescrLoader()
Adjust new ReflClassDescLoader instance. In particular, detect if advanced method Class.forName() is implemented, which enables to do not initialize the class being loaded. Otherwise, tune this instance to use simpler version of the method forName(), which must be available anyway.

See Also:
Class.forName(String,boolean,ClassLoader), Class.forName(String)
Method Detail

load

public ClassDescription load(java.lang.String name)
                      throws java.lang.ClassNotFoundException
Return new ClassDescription for that class found by the given name.

Specified by:
load in interface ClassDescriptionLoader
Throws:
java.lang.ClassNotFoundException - If Class.forName(name) fails to load the required class.
See Also:
Class.forName(String)