Top Constructors Methods
org.jvnet.hk2.internal

public Class PerLookupContext

extends Object
implements Context<PerLookup>
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.api.Context
Imports
java.lang.annotation.Annotation, org.glassfish.hk2.api.ActiveDescriptor, .Context, .PerLookup, .ServiceHandle

Author
jwells

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
containsKey(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.containsKey.

Determines if this context has a value for the given key

public void
destroyOne(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.destroyOne.

This method is called when ServiceHandle#destroy() method is called.

public <T> T
findOrCreate(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root)

Implements org.glassfish.hk2.api.Context.findOrCreate.

Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance.

public Class<? extends Annotation>
getScope()

Implements org.glassfish.hk2.api.Context.getScope.

The scope for which this is the context

public boolean
isActive()

Implements org.glassfish.hk2.api.Context.isActive.

True if this context is active, false otherwise

public void
shutdown()

Implements org.glassfish.hk2.api.Context.shutdown.

Shut down this context.

public boolean
supportsNullCreation()

Implements org.glassfish.hk2.api.Context.supportsNullCreation.

Returns true if the findOrCreate method can return null

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PerLookupContextback to summary
public PerLookupContext()

Method Detail

containsKeyback to summary
public boolean containsKey(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.containsKey.

Doc from org.glassfish.hk2.api.Context.containsKey.

Determines if this context has a value for the given key

Annotations
@Override
destroyOneback to summary
public void destroyOne(ActiveDescriptor<?> descriptor)

Implements org.glassfish.hk2.api.Context.destroyOne.

Doc from org.glassfish.hk2.api.Context.destroyOne.

This method is called when ServiceHandle#destroy() method is called. It is up to the context implementation whether or not to honor this destruction request based on the lifecycle requirements of the context

Annotations
@Override
findOrCreateback to summary
public <T> T findOrCreate(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root)

Implements org.glassfish.hk2.api.Context.findOrCreate.

Doc from org.glassfish.hk2.api.Context.findOrCreate.

Creates a contextual instance of this ActiveDescriptor by calling its create method if there is no other matching contextual instance. If there is already a contextual instance it is returned. If parent is null then this must work like the find call

Annotations
@Override
getScopeback to summary
public Class<? extends Annotation> getScope()

Implements org.glassfish.hk2.api.Context.getScope.

Doc from org.glassfish.hk2.api.Context.getScope.

The scope for which this is the context

Annotations
@Override
isActiveback to summary
public boolean isActive()

Implements org.glassfish.hk2.api.Context.isActive.

Doc from org.glassfish.hk2.api.Context.isActive.

True if this context is active, false otherwise

Annotations
@Override
shutdownback to summary
public void shutdown()

Implements org.glassfish.hk2.api.Context.shutdown.

Doc from org.glassfish.hk2.api.Context.shutdown.

Shut down this context.

Annotations
@Override
supportsNullCreationback to summary
public boolean supportsNullCreation()

Implements org.glassfish.hk2.api.Context.supportsNullCreation.

Doc from org.glassfish.hk2.api.Context.supportsNullCreation.

Returns true if the findOrCreate method can return null

Annotations
@Override