Package org.jvnet.hk2.internal
Class ClazzCreator<T>
java.lang.Object
org.jvnet.hk2.internal.ClazzCreator<T>
- Type Parameters:
T
- The type of object this creator creates
- All Implemented Interfaces:
Creator<T>
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<SystemInjecteeImpl> private final Class
<?> private final ServiceLocatorImpl
private ClazzCreator.ResolutionInfo
private final Set
<ClazzCreator.ResolutionInfo> private final Set
<ClazzCreator.ResolutionInfo> private Method
private Method
private ActiveDescriptor
<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(ServiceHandle<?> root, SystemDescriptor<?> eventThrower) Creates an instance of the given typeprivate Object
createMe
(Map<SystemInjecteeImpl, Object> resolved) void
Disposes the given instanceprivate void
fieldMe
(Map<SystemInjecteeImpl, Object> resolved, T t) (package private) Class
<?> Returns all the injectees needed prior to creating this object(package private) ServiceLocatorImpl
(package private) ActiveDescriptor
<?> (package private) void
initialize
(ActiveDescriptor<?> selfDescriptor, String analyzerName, Collector collector) (package private) void
initialize
(ActiveDescriptor<?> selfDescriptor, Collector collector) private void
methodMe
(Map<SystemInjecteeImpl, Object> resolved, T t) private void
postConstructMe
(T t) private void
preDestroyMe
(T t) (package private) void
resetSelfDescriptor
(ActiveDescriptor<?> selfDescriptor) This is done because sometimes when creating the creator we do not know what the true system descriptor will beprivate void
resolve
(Map<SystemInjecteeImpl, Object> addToMe, InjectionResolver<?> resolver, SystemInjecteeImpl injectee, ServiceHandle<?> root, Collector errorCollection) private Map
<SystemInjecteeImpl, Object> resolveAllDependencies
(ServiceHandle<?> root) toString()
-
Field Details
-
locator
-
implClass
-
myInitializers
-
myFields
-
selfDescriptor
-
myConstructor
-
allInjectees
-
postConstructMethod
-
preDestroyMethod
-
-
Constructor Details
-
ClazzCreator
ClazzCreator(ServiceLocatorImpl locator, Class<?> implClass)
-
-
Method Details
-
initialize
-
initialize
-
resetSelfDescriptor
This is done because sometimes when creating the creator we do not know what the true system descriptor will be- Parameters:
selfDescriptor
- The descriptor that should replace our self descriptor
-
resolve
private void resolve(Map<SystemInjecteeImpl, Object> addToMe, InjectionResolver<?> resolver, SystemInjecteeImpl injectee, ServiceHandle<?> root, Collector errorCollection) -
resolveAllDependencies
private Map<SystemInjecteeImpl,Object> resolveAllDependencies(ServiceHandle<?> root) throws MultiException, IllegalStateException - Throws:
MultiException
IllegalStateException
-
createMe
- Throws:
Throwable
-
fieldMe
- Throws:
Throwable
-
methodMe
- Throws:
Throwable
-
postConstructMe
- Throws:
Throwable
-
preDestroyMe
- Throws:
Throwable
-
create
Description copied from interface:Creator
Creates an instance of the given type -
dispose
Description copied from interface:Creator
Disposes the given instance -
getInjectees
Description copied from interface:Creator
Returns all the injectees needed prior to creating this object- Specified by:
getInjectees
in interfaceCreator<T>
- Returns:
- a List of all the injectees
-
getServiceLocator
ServiceLocatorImpl getServiceLocator() -
getImplClass
Class<?> getImplClass() -
getUnderlyingDescriptor
ActiveDescriptor<?> getUnderlyingDescriptor() -
toString
-