Package org.apache.tapestry5.plastic
Interface ClassInstantiator<T>
- All Known Implementing Classes:
ClassInstantiatorImpl
public interface ClassInstantiator<T>
The end result of a class transformation is a ClassInstantiator that can be used to
instantiate an instance of the transformed class.
-
Method Summary
Modifier and TypeMethodDescriptionCreates and returns a new instance of the transformed class.<V> ClassInstantiator<T>Returns a new instantiator that adds the indicated value to the instance'sInstanceContext.
-
Method Details
-
newInstance
T newInstance()Creates and returns a new instance of the transformed class. -
with
Returns a new instantiator that adds the indicated value to the instance'sInstanceContext.- Parameters:
valueType- defines the type of value, and acts as a key to retrieve the valueinstanceContextValue- the non-null value stored- Throws:
AssertionError- if instanceContextValue is nullIllegalStateException- if a value of the given value type has already been stored
-