|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.marshalling.reflect.ReflectiveCreator
public class ReflectiveCreator
A creator that simply uses reflection to locate and invoke a zero-argument constructor.
| Constructor Summary | |
|---|---|
ReflectiveCreator()
|
|
| Method Summary | ||
|---|---|---|
|
create(java.lang.Class<T> clazz)
Create an object instance. |
|
protected
|
getCachedConstructor(java.lang.Class<T> clazz)
Get a cached constructor for the class. |
|
protected
|
getNewConstructor(java.lang.Class<T> clazz)
Get the constructor to use for a class. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReflectiveCreator()
| Method Detail |
|---|
protected <T> java.lang.reflect.Constructor<T> getNewConstructor(java.lang.Class<T> clazz)
null if no suitable constructor is available.
clazz - the class to get a constructor for
null if none is available
protected <T> java.lang.reflect.Constructor<T> getCachedConstructor(java.lang.Class<T> clazz)
throws java.io.InvalidClassException
getNewConstructor() method is invoked to get it. If no constructor is available then an
InstantiationException is thrown.
clazz - the class to look up
java.lang.InstantiationException - if no suitable constructor is available
java.io.InvalidClassException
public <T> T create(java.lang.Class<T> clazz)
throws java.io.InvalidClassException
create in interface Creatorclazz - the type of object to create
java.io.InvalidClassException - if an instance of the class could not be instantiated for some reason
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||