|
JBoss Marshalling 1.3.0.CR9 | |||||||||
| 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(Class<T> clazz)
Create an object instance. |
|
protected
|
getCachedConstructor(Class<T> clazz)
Get a cached constructor for the class. |
|
protected
|
getNewConstructor(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> Constructor<T> getNewConstructor(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> Constructor<T> getCachedConstructor(Class<T> clazz)
throws InvalidClassException
getNewConstructor() method is invoked to get it. If no constructor is available then an
InstantiationException is thrown.
clazz - the class to look up
InstantiationException - if no suitable constructor is available
InvalidClassException
public <T> T create(Class<T> clazz)
throws InvalidClassException
create in interface Creatorclazz - the type of object to create
InvalidClassException - if an instance of the class could not be instantiated for some reason
|
JBoss Marshalling 1.3.0.CR9 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||