public interface ClassInstantiator<T>
Modifier and Type | Method and Description |
---|---|
T |
newInstance()
Creates and returns a new instance of the transformed class.
|
<V> ClassInstantiator<T> |
with(Class<V> valueType,
V instanceContextValue)
Returns a new instantiator that adds the indicated value to the
instance's
InstanceContext . |
T newInstance()
<V> ClassInstantiator<T> with(Class<V> valueType, V instanceContextValue)
InstanceContext
.valueType
- defines the type of value, and acts as a key to retrieve the valueinstanceContextValue
- the non-null value storedAssertionError
- if instanceContextValue is nullIllegalStateException
- if a value of the given value type has already been stored5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.