|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.ClassFactory
public final class ClassFactory
Creates new instances of classes.
This code handles the case where the class is not public or the constructor is not public.
Constructor Summary | |
---|---|
ClassFactory()
|
Method Summary | ||
---|---|---|
static
|
create(Class<T> clazz)
The same as create0(java.lang.Class but with an error handling to make
the instanciation error fatal. |
|
static Object |
create(Method method)
Call a method in the factory class to get the object. |
|
static
|
create0(Class<T> clazz)
Creates a new instance of the class but throw exceptions without catching it. |
|
static
|
inferImplClass(Class<T> fieldType,
Class[] knownImplClasses)
Infers the instanciable implementation class that can be assigned to the given field type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ClassFactory()
Method Detail |
---|
public static <T> T create0(Class<T> clazz) throws IllegalAccessException, InvocationTargetException, InstantiationException
IllegalAccessException
InvocationTargetException
InstantiationException
public static <T> T create(Class<T> clazz)
create0(java.lang.Class)
but with an error handling to make
the instanciation error fatal.
public static Object create(Method method)
public static <T> Class<? extends T> inferImplClass(Class<T> fieldType, Class[] knownImplClasses)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |