|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.glassfish.gmbal.util.GenericConstructor<T>
public class GenericConstructor<T>
Class that allows any class to be instantiated via any accessible constructor. Really a short hand to avoid writing a bunch of reflective code.
| Constructor Summary | |
|---|---|
GenericConstructor(java.lang.Class<T> type,
java.lang.String className,
java.lang.Class<?>... signature)
Create a generic of type T for the untyped class cls. |
|
| Method Summary | |
|---|---|
T |
create(java.lang.Object... args)
Create an instance of type T using the constructor that matches the given arguments if possible. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericConstructor(java.lang.Class<T> type,
java.lang.String className,
java.lang.Class<?>... signature)
type - The expected type of a create call.className - The name of the class to use for a constructor.signature - The signature of the desired constructor.
java.lang.IllegalArgumentException - if cls is not a subclass of type.| Method Detail |
|---|
public T create(java.lang.Object... args)
args - The constructor arguments.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||