T - The type to be instantiated@Deprecated public interface Instantiator<T>
Instantiates an instance of a specific type. Note that instances of this type are automatically generated by the AnnotationProcessor at compile time. Sub-classes of this type MUST NOT be manually defined.
In order to be able to generate an Instantiator for a type, the type's constructor must have package or public level visibility. If this requirement is not met then an Instantiator will not be generated for the type.
| Modifier and Type | Method and Description |
|---|---|
T |
newInstance(Object... dependencies)
Deprecated.
Produce a new instance of the specified type
|
Class<T> |
type()
Deprecated.
The type that this
Instantiator creates |
Class<T> type()
Instantiator createsClass instanceT newInstance(Object... dependencies) throws InvocationTargetException
dependencies - Instances of types that the instantiated type depends on. Theses dependencies match the order established by the parameter declarations of the type's @Injected constructor.InvocationTargetException - if an error occurs during invocation of the instantiated type's constructor