| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(ActiveDescriptor<?> descriptor)
Determines if this context has a value for the given key
|
void |
destroyOne(ActiveDescriptor<?> one)
Release one system descriptor
|
<T> T |
findOrCreate(ActiveDescriptor<T> activeDescriptor,
ServiceHandle<?> root)
Creates a contextual instance of this ActiveDescriptor by calling its
create method if there is no other matching contextual instance.
|
Class<? extends Annotation> |
getScope()
The scope for which this is the context
|
boolean |
isActive()
True if this context is active, false otherwise
|
void |
shutdown()
Shut down this context.
|
boolean |
supportsNullCreation()
Returns true if the findOrCreate method can return null
|
public Class<? extends Annotation> getScope()
Contextpublic <T> T findOrCreate(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root)
ContextfindOrCreate in interface Context<javax.inject.Singleton>activeDescriptor - The descriptor to use when creating instancesroot - The extended provider for the outermost parent being createdpublic boolean containsKey(ActiveDescriptor<?> descriptor)
ContextcontainsKey in interface Context<javax.inject.Singleton>descriptor - The descriptor to look for in this contextpublic boolean isActive()
Contextpublic boolean supportsNullCreation()
ContextsupportsNullCreation in interface Context<javax.inject.Singleton>public void shutdown()
Contextpublic void destroyOne(ActiveDescriptor<?> one)
destroyOne in interface Context<javax.inject.Singleton>one - The descriptor to release (may not be null). Further, the cache MUST be setCopyright © 2009–2017 Oracle Corporation. All rights reserved.