Modifier and Type | Class and Description |
---|---|
private static class |
ClazzCreator.ResolutionInfo |
Modifier and Type | Field and Description |
---|---|
private java.util.List<SystemInjecteeImpl> |
allInjectees |
private java.lang.Class<?> |
implClass |
private ServiceLocatorImpl |
locator |
private ClazzCreator.ResolutionInfo |
myConstructor |
private java.util.Set<ClazzCreator.ResolutionInfo> |
myFields |
private java.util.Set<ClazzCreator.ResolutionInfo> |
myInitializers |
private java.lang.reflect.Method |
postConstructMethod |
private java.lang.reflect.Method |
preDestroyMethod |
private ActiveDescriptor<?> |
selfDescriptor |
Constructor and Description |
---|
ClazzCreator(ServiceLocatorImpl locator,
java.lang.Class<?> implClass) |
Modifier and Type | Method and Description |
---|---|
T |
create(ServiceHandle<?> root,
SystemDescriptor<?> eventThrower)
Creates an instance of the given type
|
private java.lang.Object |
createMe(java.util.Map<SystemInjecteeImpl,java.lang.Object> resolved) |
void |
dispose(T instance)
Disposes the given instance
|
private void |
fieldMe(java.util.Map<SystemInjecteeImpl,java.lang.Object> resolved,
T t) |
(package private) java.lang.Class<?> |
getImplClass() |
java.util.List<Injectee> |
getInjectees()
Returns all the injectees needed prior
to creating this object
|
(package private) ServiceLocatorImpl |
getServiceLocator() |
(package private) ActiveDescriptor<?> |
getUnderlyingDescriptor() |
(package private) void |
initialize(ActiveDescriptor<?> selfDescriptor,
Collector collector) |
(package private) void |
initialize(ActiveDescriptor<?> selfDescriptor,
java.lang.String analyzerName,
Collector collector) |
private void |
methodMe(java.util.Map<SystemInjecteeImpl,java.lang.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 be
|
private void |
resolve(java.util.Map<SystemInjecteeImpl,java.lang.Object> addToMe,
InjectionResolver<?> resolver,
SystemInjecteeImpl injectee,
ServiceHandle<?> root,
Collector errorCollection) |
private java.util.Map<SystemInjecteeImpl,java.lang.Object> |
resolveAllDependencies(ServiceHandle<?> root) |
java.lang.String |
toString() |
private final ServiceLocatorImpl locator
private final java.lang.Class<?> implClass
private final java.util.Set<ClazzCreator.ResolutionInfo> myInitializers
private final java.util.Set<ClazzCreator.ResolutionInfo> myFields
private ActiveDescriptor<?> selfDescriptor
private ClazzCreator.ResolutionInfo myConstructor
private java.util.List<SystemInjecteeImpl> allInjectees
private java.lang.reflect.Method postConstructMethod
private java.lang.reflect.Method preDestroyMethod
ClazzCreator(ServiceLocatorImpl locator, java.lang.Class<?> implClass)
void initialize(ActiveDescriptor<?> selfDescriptor, java.lang.String analyzerName, Collector collector)
void initialize(ActiveDescriptor<?> selfDescriptor, Collector collector)
void resetSelfDescriptor(ActiveDescriptor<?> selfDescriptor)
selfDescriptor
- The descriptor that should replace our self descriptorprivate void resolve(java.util.Map<SystemInjecteeImpl,java.lang.Object> addToMe, InjectionResolver<?> resolver, SystemInjecteeImpl injectee, ServiceHandle<?> root, Collector errorCollection)
private java.util.Map<SystemInjecteeImpl,java.lang.Object> resolveAllDependencies(ServiceHandle<?> root) throws MultiException, java.lang.IllegalStateException
MultiException
java.lang.IllegalStateException
private java.lang.Object createMe(java.util.Map<SystemInjecteeImpl,java.lang.Object> resolved) throws java.lang.Throwable
java.lang.Throwable
private void fieldMe(java.util.Map<SystemInjecteeImpl,java.lang.Object> resolved, T t) throws java.lang.Throwable
java.lang.Throwable
private void methodMe(java.util.Map<SystemInjecteeImpl,java.lang.Object> resolved, T t) throws java.lang.Throwable
java.lang.Throwable
private void postConstructMe(T t) throws java.lang.Throwable
java.lang.Throwable
private void preDestroyMe(T t) throws java.lang.Throwable
java.lang.Throwable
public T create(ServiceHandle<?> root, SystemDescriptor<?> eventThrower)
Creator
public void dispose(T instance)
Creator
public java.util.List<Injectee> getInjectees()
Creator
getInjectees
in interface Creator<T>
ServiceLocatorImpl getServiceLocator()
java.lang.Class<?> getImplClass()
ActiveDescriptor<?> getUnderlyingDescriptor()
public java.lang.String toString()
toString
in class java.lang.Object