|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.lib.util.ConcreteClassGenerator
public class ConcreteClassGenerator
Dynamically generates concrete implementations of abstract classes.
Constructor Summary | |
---|---|
ConcreteClassGenerator()
|
Method Summary | ||
---|---|---|
static
|
getConcreteConstructor(Class<T> abstractClass,
Class<?>... argTypes)
Get the constructor of the concrete, dynamic wrapper class of the given abstract class with matching argument types. |
|
static
|
makeConcrete(Class<T> abstractClass)
Takes an abstract class and returns a concrete implementation. |
|
static
|
newInstance(Class<T> c)
|
|
static
|
newInstance(Class<T> c,
Class<?>[] paramTypes,
Object[] params)
Utility method for safely invoking a constructor that we do not expect to throw exceptions. |
|
static
|
newInstance(Class<T> c,
Class<? extends P> paramType,
P param)
|
|
static
|
newInstance(Class<T> c,
Class<? extends P1> paramType1,
P1 param1,
Class<? extends P2> paramType2,
P2 param2)
|
|
static
|
newInstance(Class<T> c,
Class<? extends P1> paramType1,
P1 param1,
Class<? extends P2> paramType2,
P2 param2,
Class<? extends P3> paramType3,
P3 param3)
|
|
static
|
newInstance(Class<T> c,
Class<? extends P1> paramType1,
P1 param1,
Class<? extends P2> paramType2,
P2 param2,
Class<? extends P3> paramType3,
P3 param3,
Class<? extends P4> paramType4,
P4 param4)
|
|
static
|
newInstance(Constructor<T> cons,
Object... params)
Construct a new instance by the given constructor and its arguments. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConcreteClassGenerator()
Method Detail |
---|
public static <T> Constructor<T> getConcreteConstructor(Class<T> abstractClass, Class<?>... argTypes) throws ClassNotFoundException
the
- argTypes of the constructor to look for. null signify default constructor.
ClassNotFoundException
public static <T> Class<? extends T> makeConcrete(Class<T> abstractClass) throws ClassNotFoundException
AbstractMethodError
.
abstractClass
- the abstract class
ClassNotFoundException
public static <T> T newInstance(Constructor<T> cons, Object... params)
public static <T> T newInstance(Class<T> c, Class<?>[] paramTypes, Object[] params)
c
- the class to constructparamTypes
- the types of the parametersparams
- the parameter values
public static <T> T newInstance(Class<T> c)
newInstance(java.lang.Class,java.lang.Class[],java.lang.Object[])
public static <T,P> T newInstance(Class<T> c, Class<? extends P> paramType, P param)
newInstance(java.lang.Class,java.lang.Class[],java.lang.Object[])
public static <T,P1,P2> T newInstance(Class<T> c, Class<? extends P1> paramType1, P1 param1, Class<? extends P2> paramType2, P2 param2)
newInstance(java.lang.Class,java.lang.Class[],java.lang.Object[])
public static <T,P1,P2,P3> T newInstance(Class<T> c, Class<? extends P1> paramType1, P1 param1, Class<? extends P2> paramType2, P2 param2, Class<? extends P3> paramType3, P3 param3)
newInstance(java.lang.Class,java.lang.Class[],java.lang.Object[])
public static <T,P1,P2,P3,P4> T newInstance(Class<T> c, Class<? extends P1> paramType1, P1 param1, Class<? extends P2> paramType2, P2 param2, Class<? extends P3> paramType3, P3 param3, Class<? extends P4> paramType4, P4 param4)
newInstance(java.lang.Class,java.lang.Class[],java.lang.Object[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |