Top Fields Constructors Methods
org.jvnet.hk2.internal

public Class FactoryCreator<T>

extends Object
implements Creator<T>
Class Inheritance
All Implemented Interfaces
org.jvnet.hk2.internal.Creator
Type Parameters
<T>
The thing this factory is producing
Imports
java.util.Collections, .List, .HashSet, java.util.concurrent.ConcurrentHashMap, org.glassfish.hk2.api.ActiveDescriptor, .Factory, .Injectee, .InstanceLifecycleEventType, .InstantiationService, .MultiException, .ServiceHandle, .ServiceLocator, org.glassfish.hk2.utilities.general.ThreadSpecificObject, org.glassfish.hk2.utilities.reflection.Pretty

Author
jwells

Field Summary

Modifier and TypeField and Description
private final ConcurrentHashMap<ThreadSpecificObject<ActiveDescriptor<?>>, Object>
private final ActiveDescriptor<?>
private final InstantiationServiceImpl
private final ServiceLocator
private static final Object

Constructor Summary

AccessConstructor and Description
pack-priv
FactoryCreator(ServiceLocator locator, ActiveDescriptor<?> factoryDescriptor)

Method Summary

Modifier and TypeMethod and Description
public T
create(ServiceHandle<?> root, SystemDescriptor<?> eventThrower)

Implements org.jvnet.hk2.internal.Creator.create.

Creates an instance of the given type

public void
dispose(T instance)

Implements org.jvnet.hk2.internal.Creator.dispose.

Disposes the given instance

private ServiceHandle<Factory<T>>
public List<Injectee>
getInjectees()

Implements org.jvnet.hk2.internal.Creator.getInjectees.

Returns all the injectees needed prior to creating this object

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cycleFinderback to summary
private final ConcurrentHashMap<ThreadSpecificObject<ActiveDescriptor<?>>, Object> cycleFinder
factoryDescriptorback to summary
private final ActiveDescriptor<?> factoryDescriptor
instantiationServiceback to summary
private final InstantiationServiceImpl instantiationService
locatorback to summary
private final ServiceLocator locator
MAP_VALUEback to summary
private static final Object MAP_VALUE

Constructor Detail

FactoryCreatorback to summary
pack-priv FactoryCreator(ServiceLocator locator, ActiveDescriptor<?> factoryDescriptor)

Method Detail

createback to summary
public T create(ServiceHandle<?> root, SystemDescriptor<?> eventThrower) throws MultiException

Implements org.jvnet.hk2.internal.Creator.create.

Doc from org.jvnet.hk2.internal.Creator.create.

Creates an instance of the given type

Annotations
@Override
Exceptions
MultiException:
if the creator threw an exception during construction
disposeback to summary
public void dispose(T instance)

Implements org.jvnet.hk2.internal.Creator.dispose.

Doc from org.jvnet.hk2.internal.Creator.dispose.

Disposes the given instance

Annotations
@Override
getFactoryHandleback to summary
private ServiceHandle<Factory<T>> getFactoryHandle()
Annotations
@SuppressWarnings:unchecked
getInjecteesback to summary
public List<Injectee> getInjectees()

Implements org.jvnet.hk2.internal.Creator.getInjectees.

Doc from org.jvnet.hk2.internal.Creator.getInjectees.

Returns all the injectees needed prior to creating this object

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override