A - the type of the constructor argumentR - the type of the resulting instancepublic abstract class SingleArgumentInvokableInstantiator<A,R> extends java.lang.Object implements Instantiator<A,R>
This class is immutable and thus reusable and thread safe.
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Class<R> |
instanceClass |
| Constructor and Description |
|---|
SingleArgumentInvokableInstantiator(java.lang.Class<R> instanceClass,
java.lang.Class<A> constructorArgumentClass) |
| Modifier and Type | Method and Description |
|---|---|
<A1 extends A> |
create(A1 argument)
Creates an instance, using the given argument.
|
protected abstract com.google.common.reflect.Invokable<R,R> |
invokableFor(java.lang.Class<A> constructorArgumentClass) |
protected final java.lang.Class<R> instanceClass
public <A1 extends A> R create(A1 argument)
Instantiatorcreate in interface Instantiator<A,R>argument - the argument used to create the new instance