Package org.objenesis.instantiator.basic
Class DelegatingToExoticInstantiator<T>
java.lang.Object
org.objenesis.instantiator.basic.DelegatingToExoticInstantiator<T>
- Type Parameters:
T
- type of the class instantiated
- All Implemented Interfaces:
ObjectInstantiator<T>
- Direct Known Subclasses:
MagicInstantiator
,ProxyingInstantiator
public abstract class DelegatingToExoticInstantiator<T>
extends Object
implements ObjectInstantiator<T>
Helper class extended by instantiators for which the implementation was moved to the exotic project.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DelegatingToExoticInstantiator
(String className, Class<T> type) -
Method Summary
Modifier and TypeMethodDescriptionprivate ObjectInstantiator
<T> instantiator
(String className, Class<T> type, Constructor<ObjectInstantiator<T>> constructor) private Class
<ObjectInstantiator<T>> instantiatorClass
(String className) private Constructor
<ObjectInstantiator<T>> instantiatorConstructor
(String className, Class<ObjectInstantiator<T>> clazz) Returns a new instance of an object.
-
Field Details
-
wrapped
-
-
Constructor Details
-
DelegatingToExoticInstantiator
-
-
Method Details
-
instantiator
private ObjectInstantiator<T> instantiator(String className, Class<T> type, Constructor<ObjectInstantiator<T>> constructor) -
instantiatorClass
-
instantiatorConstructor
private Constructor<ObjectInstantiator<T>> instantiatorConstructor(String className, Class<ObjectInstantiator<T>> clazz) -
newInstance
Description copied from interface:ObjectInstantiator
Returns a new instance of an object. The returned object's class is defined by the implementation.- Specified by:
newInstance
in interfaceObjectInstantiator<T>
- Returns:
- A new instance of an object.
-