Class ClassInstantiatorImpl<T>
- java.lang.Object
-
- org.apache.tapestry5.internal.plastic.ClassInstantiatorImpl<T>
-
- All Implemented Interfaces:
ClassInstantiator<T>,InstanceContext
public class ClassInstantiatorImpl<T> extends java.lang.Object implements ClassInstantiator<T>, InstanceContext
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> Vget(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.TnewInstance()Creates and returns a new instance of the transformed class.java.lang.StringtoString()<V> ClassInstantiator<T>with(java.lang.Class<V> valueType, V instanceContextValue)Returns a new instantiator that adds the indicated value to the instance'sInstanceContext.
-
-
-
Method Detail
-
with
public <V> ClassInstantiator<T> with(java.lang.Class<V> valueType, V instanceContextValue)
Description copied from interface:ClassInstantiatorReturns a new instantiator that adds the indicated value to the instance'sInstanceContext.- Specified by:
within interfaceClassInstantiator<T>- Parameters:
valueType- defines the type of value, and acts as a key to retrieve the valueinstanceContextValue- the non-null value stored
-
get
public <V> V get(java.lang.Class<V> valueType)
Description copied from interface:InstanceContextGets an instance context value which is identified by type.- Specified by:
getin interfaceInstanceContext
-
newInstance
public T newInstance()
Description copied from interface:ClassInstantiatorCreates and returns a new instance of the transformed class.- Specified by:
newInstancein interfaceClassInstantiator<T>
-
getInstanceType
public java.lang.Class<T> getInstanceType()
Description copied from interface:InstanceContextReturns the type of the instance created with this context. This is most often of interest to implementations ofComputedValue.- Specified by:
getInstanceTypein interfaceInstanceContext
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-