public class ReflectiveCreator extends Object implements Creator
Constructor and Description |
---|
ReflectiveCreator() |
Modifier and Type | Method and Description |
---|---|
<T> T |
create(Class<T> clazz)
Create an object instance.
|
protected <T> Constructor<T> |
getNewConstructor(Class<T> clazz)
Get the constructor to use for a class.
|
protected <T> Constructor<T> getNewConstructor(Class<T> clazz)
null
if no suitable constructor is available.clazz
- the class to get a constructor fornull
if none is availablepublic <T> T create(Class<T> clazz) throws InvalidClassException
create
in interface Creator
clazz
- the type of object to createInvalidClassException
- if an instance of the class could not be instantiated for some reasonCopyright © 2012 JBoss by Red Hat. All Rights Reserved.