Class ClassInfo
- java.lang.Object
-
- org.apache.derby.iapi.services.loader.ClassInfo
-
- All Implemented Interfaces:
InstanceGetter
public class ClassInfo extends java.lang.Object implements InstanceGetter
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<?>clazzprivate java.lang.reflect.ConstructornoArgConstructorprivate static java.lang.Object[]noArgumentsprivate static java.lang.Class[]noParametersprivate booleanuseConstructor
-
Constructor Summary
Constructors Constructor Description ClassInfo(java.lang.Class<?> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetClassName()Return the name of this class.java.lang.ClassgetClassObject()Return the class object for this class.java.lang.ObjectgetNewInstance()Create an instance of this class.
-
-
-
Field Detail
-
noParameters
private static final java.lang.Class[] noParameters
-
noArguments
private static final java.lang.Object[] noArguments
-
clazz
private final java.lang.Class<?> clazz
-
useConstructor
private boolean useConstructor
-
noArgConstructor
private java.lang.reflect.Constructor noArgConstructor
-
-
Method Detail
-
getClassName
public final java.lang.String getClassName()
Return the name of this class.
-
getClassObject
public final java.lang.Class getClassObject()
Return the class object for this class.
-
getNewInstance
public java.lang.Object getNewInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodExceptionCreate an instance of this class. Assumes that clazz has already been initialized. Optimizes Class.newInstance() by caching and using the no-arg Constructor directly. Class.newInstance() looks up the constructor each time.- Specified by:
getNewInstancein interfaceInstanceGetter- Throws:
java.lang.InstantiationException- Zero arg constructor can not be executedjava.lang.IllegalAccessException- Class or zero arg constructor is not public.java.lang.reflect.InvocationTargetException- Exception throw in zero-arg constructor.java.lang.NoSuchMethodException
-
-