Top Fields Constructors Methods
org.jvnet.hk2.internal

public Class InstanceLifecycleEventImpl

extends Object
implements InstanceLifecycleEvent
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.api.InstanceLifecycleEvent
Imports
java.util.Collections, .Map, org.glassfish.hk2.api.ActiveDescriptor, .Injectee, .InstanceLifecycleEvent, .InstanceLifecycleEventType

Author
jwells

Field Summary

Modifier and TypeField and Description
private final ActiveDescriptor<?>
private final InstanceLifecycleEventType
private final Map<Injectee, Object>
private final Object

Constructor Summary

AccessConstructor and Description
pack-priv
InstanceLifecycleEventImpl(InstanceLifecycleEventType eventType, Object lifecycleObject, Map<Injectee, Object> knownInjectees, ActiveDescriptor<?> descriptor)

pack-priv

Method Summary

Modifier and TypeMethod and Description
public ActiveDescriptor<?>
getActiveDescriptor()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getActiveDescriptor.

The active descriptor that is being used for the operation.

public InstanceLifecycleEventType
getEventType()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getEventType.

Gets the type of event this describes.

public Map<Injectee, Object>
getKnownInjectees()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getKnownInjectees.

A map from the Injectee to the object actually used in the production, if known.

public Object
getLifecycleObject()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getLifecycleObject.

The object that is being described by this event.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

descriptorback to summary
private final ActiveDescriptor<?> descriptor
eventTypeback to summary
private final InstanceLifecycleEventType eventType
knownInjecteesback to summary
private final Map<Injectee, Object> knownInjectees
lifecycleObjectback to summary
private final Object lifecycleObject

Constructor Detail

InstanceLifecycleEventImplback to summary
pack-priv InstanceLifecycleEventImpl(InstanceLifecycleEventType eventType, Object lifecycleObject, Map<Injectee, Object> knownInjectees, ActiveDescriptor<?> descriptor)
InstanceLifecycleEventImplback to summary
pack-priv InstanceLifecycleEventImpl(InstanceLifecycleEventType eventType, Object lifecycleObject, ActiveDescriptor<?> descriptor)

Method Detail

getActiveDescriptorback to summary
public ActiveDescriptor<?> getActiveDescriptor()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getActiveDescriptor.

Doc from org.glassfish.hk2.api.InstanceLifecycleEvent.getActiveDescriptor.

The active descriptor that is being used for the operation. For PRE_PRODUCTION and POST_PRODUCTION this is the descriptor that will create or that created the object. For PRE_DESTRUCTION this is the descriptor that will be used to destroy the object

Annotations
@Override
getEventTypeback to summary
public InstanceLifecycleEventType getEventType()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getEventType.

Doc from org.glassfish.hk2.api.InstanceLifecycleEvent.getEventType.

Gets the type of event this describes. The values may be:

  • PRE_PRODUCTION
  • POST_PRODUCTION
  • PRE_DESTRUCTION
Annotations
@Override
getKnownInjecteesback to summary
public Map<Injectee, Object> getKnownInjectees()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getKnownInjectees.

Doc from org.glassfish.hk2.api.InstanceLifecycleEvent.getKnownInjectees.

A map from the Injectee to the object actually used in the production, if known. This will return null in the PRE_DESTRUCTION case. In the PRE_PRODUCTION and POST_PRODUCTION cases this will return non-null if the system knows the objects that will be or were injected into the produced object. If this method returns null in the PRE_PRODUCTION or POST_PRODUCTION case then the system does not know what objects were injected into the produced object, which happens in the case of objects created by a Factory or objects created by third-party (pre-reified) ActiveDescriptors. If this method returns an empty map then the system knows that nothing will be or was injected into to produced object.

Annotations
@Override
getLifecycleObjectback to summary
public Object getLifecycleObject()

Implements org.glassfish.hk2.api.InstanceLifecycleEvent.getLifecycleObject.

Doc from org.glassfish.hk2.api.InstanceLifecycleEvent.getLifecycleObject.

The object that is being described by this event. In the POST_PRODUCTION case this is the object that was just produced. In the PRE_DESTRUCTION case this is the object that will be destroyed. Will be null in the PRE_PRODUCTION case

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