Package org.jvnet.hk2.internal
Class FactoryCreator<T>
- java.lang.Object
-
- org.jvnet.hk2.internal.FactoryCreator<T>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.ConcurrentHashMap<ThreadSpecificObject<ActiveDescriptor<?>>,java.lang.Object>cycleFinderprivate ActiveDescriptor<?>factoryDescriptorprivate InstantiationServiceImplinstantiationServiceprivate ServiceLocatorlocatorprivate static java.lang.ObjectMAP_VALUE
-
Constructor Summary
Constructors Constructor Description FactoryCreator(ServiceLocator locator, ActiveDescriptor<?> factoryDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcreate(ServiceHandle<?> root, SystemDescriptor<?> eventThrower)Creates an instance of the given typevoiddispose(T instance)Disposes the given instanceprivate ServiceHandle<Factory<T>>getFactoryHandle()java.util.List<Injectee>getInjectees()Returns all the injectees needed prior to creating this objectjava.lang.StringtoString()
-
-
-
Field Detail
-
MAP_VALUE
private static final java.lang.Object MAP_VALUE
-
cycleFinder
private final java.util.concurrent.ConcurrentHashMap<ThreadSpecificObject<ActiveDescriptor<?>>,java.lang.Object> cycleFinder
-
locator
private final ServiceLocator locator
-
factoryDescriptor
private final ActiveDescriptor<?> factoryDescriptor
-
instantiationService
private final InstantiationServiceImpl instantiationService
-
-
Constructor Detail
-
FactoryCreator
FactoryCreator(ServiceLocator locator, ActiveDescriptor<?> factoryDescriptor)
-
-
Method Detail
-
getInjectees
public java.util.List<Injectee> getInjectees()
Description copied from interface:CreatorReturns all the injectees needed prior to creating this object- Specified by:
getInjecteesin interfaceCreator<T>- Returns:
- a List of all the injectees
-
getFactoryHandle
private ServiceHandle<Factory<T>> getFactoryHandle()
-
create
public T create(ServiceHandle<?> root, SystemDescriptor<?> eventThrower) throws MultiException
Description copied from interface:CreatorCreates an instance of the given type- Specified by:
createin interfaceCreator<T>- Returns:
- an instance of the given type
- Throws:
MultiException- if the creator threw an exception during construction
-
dispose
public void dispose(T instance)
Description copied from interface:CreatorDisposes the given instance
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-