com.sun.hk2.component
Class ScopeInstance
java.lang.Object
com.sun.hk2.component.ScopeInstance
- All Implemented Interfaces:
- PreDestroy
public final class ScopeInstance
- extends java.lang.Object
- implements PreDestroy
A particular instanciation of a Scope.
For example, for the "request scope", an instance
of ScopeInstance is created for each request.
- Author:
- Kohsuke Kawaguchi
- See Also:
Scope.current()
|
Field Summary |
java.lang.String |
name
Human readable scope instance name for debug assistance. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
public final java.lang.String name
- Human readable scope instance name for debug assistance.
ScopeInstance
public ScopeInstance(java.lang.String name,
java.util.Map backend)
ScopeInstance
public ScopeInstance(java.util.Map backend)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
get
public <T> T get(Inhabitant<T> inhabitant)
put
public <T> T put(Inhabitant<T> inhabitant,
T value)
release
public void release()
preDestroy
public void preDestroy()
- Description copied from interface:
PreDestroy
- The component is about to be removed from commission
- Specified by:
preDestroy in interface PreDestroy
Copyright © 2011 Oracle Corporation. All Rights Reserved.