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()
Context
public <T> T findOrCreate(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root)
Context
findOrCreate
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)
Context
containsKey
in interface Context<javax.inject.Singleton>
descriptor
- The descriptor to look for in this contextpublic boolean isActive()
Context
public boolean supportsNullCreation()
Context
supportsNullCreation
in interface Context<javax.inject.Singleton>
public void shutdown()
Context
public 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 and/or its affiliates. All Rights Reserved.