public class ClassInstantiatorImpl<T> extends java.lang.Object implements ClassInstantiator<T>, InstanceContext
Modifier and Type | Method and Description |
---|---|
<V> V |
get(java.lang.Class<V> valueType)
Gets an instance context value which is identified by type.
|
java.lang.Class<T> |
getInstanceType()
Returns the type of the instance created with this context.
|
T |
newInstance()
Creates and returns a new instance of the transformed class.
|
java.lang.String |
toString() |
<V> ClassInstantiator<T> |
with(java.lang.Class<V> valueType,
V instanceContextValue)
Returns a new instantiator that adds the indicated value to the
instance's
InstanceContext . |
public <V> ClassInstantiator<T> with(java.lang.Class<V> valueType, V instanceContextValue)
ClassInstantiator
InstanceContext
.with
in interface ClassInstantiator<T>
valueType
- defines the type of value, and acts as a key to retrieve the valueinstanceContextValue
- the non-null value storedpublic <V> V get(java.lang.Class<V> valueType)
InstanceContext
get
in interface InstanceContext
public T newInstance()
ClassInstantiator
newInstance
in interface ClassInstantiator<T>
public java.lang.Class<T> getInstanceType()
InstanceContext
ComputedValue
.getInstanceType
in interface InstanceContext
public java.lang.String toString()
toString
in class java.lang.Object
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.