Class CallbackAwareInstantiator<T>
java.lang.Object
de.cuioss.test.valueobjects.objects.impl.CallbackAwareInstantiator<T>
- Type Parameters:
T
- identifying the type of the objects to be instantiated
- All Implemented Interfaces:
ParameterizedInstantiator<T>
Delegate to
ParameterizedInstantiator
that calls
ConfigurationCallBackHandler.configure(Object)
after creation of the
object.- Author:
- Oliver Wolff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance
(List<PropertyMetadata> properties) Similar toParameterizedInstantiator.newInstance(List, boolean)
but with the difference that the caller has no control regarding the set / applied properties, that may be need for some asserts.newInstance
(List<PropertySupport> properties, boolean generatePropertyValues) Creates a new Object according to the given parameter, represented asList
ofPropertySupport
-
Constructor Details
-
CallbackAwareInstantiator
public CallbackAwareInstantiator()
-
-
Method Details
-
newInstance
Description copied from interface:ParameterizedInstantiator
Creates a new Object according to the given parameter, represented asList
ofPropertySupport
- Specified by:
newInstance
in interfaceParameterizedInstantiator<T>
- Parameters:
properties
- to be applied to the newly created object.generatePropertyValues
- indicating whether this method should implicitly callPropertySupport.generateTestValue()
or not. In case beingfalse
the caller must ensure this.- Returns:
- a newly created object with the given properties being applied.
-
newInstance
Description copied from interface:ParameterizedInstantiator
Similar toParameterizedInstantiator.newInstance(List, boolean)
but with the difference that the caller has no control regarding the set / applied properties, that may be need for some asserts. It is some kind of any()- Specified by:
newInstance
in interfaceParameterizedInstantiator<T>
- Parameters:
properties
- to be applied to the newly created object.- Returns:
- a newly created object with the given properties being applied.
-
newInstanceMinimal
- Specified by:
newInstanceMinimal
in interfaceParameterizedInstantiator<T>
- Returns:
- a new instance of the object with only required attributes set.
-
newInstanceFull
- Specified by:
newInstanceFull
in interfaceParameterizedInstantiator<T>
- Returns:
- a new instance of the object with all attributes set.
-
getRuntimeProperties
- Specified by:
getRuntimeProperties
in interfaceParameterizedInstantiator<T>
- Returns:
- the runtime information associated with this
ParameterizedInstantiator
-