Package org.glassfish.hk2.utilities
Class ContextualInput<T>
- java.lang.Object
-
- org.glassfish.hk2.utilities.ContextualInput<T>
-
public class ContextualInput<T> extends java.lang.Object
Used by several contexts for keeping the inputs ofContext.findOrCreate(ActiveDescriptor, ServiceHandle)
. May be used as the key in a HashMap, where the criteria for equality is the equality of the Descriptor
-
-
Field Summary
Fields Modifier and Type Field Description private ActiveDescriptor<T>
descriptor
private ServiceHandle<?>
root
-
Constructor Summary
Constructors Constructor Description ContextualInput(ActiveDescriptor<T> descriptor, ServiceHandle<?> root)
The inputs from theContext.findOrCreate(ActiveDescriptor, ServiceHandle)
method
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
ActiveDescriptor<T>
getDescriptor()
Returns the descriptor associated with this contextual creationServiceHandle<?>
getRoot()
Returns theServiceHandle
root associated with this contextual creationint
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
descriptor
private final ActiveDescriptor<T> descriptor
-
root
private final ServiceHandle<?> root
-
-
Constructor Detail
-
ContextualInput
public ContextualInput(ActiveDescriptor<T> descriptor, ServiceHandle<?> root)
The inputs from theContext.findOrCreate(ActiveDescriptor, ServiceHandle)
method- Parameters:
descriptor
- The non-null descriptor associated with a contextual creationroot
- The possibly null root associated with a contextual creation
-
-
Method Detail
-
getDescriptor
public ActiveDescriptor<T> getDescriptor()
Returns the descriptor associated with this contextual creation- Returns:
- The non-null descriptor associated with this creation
-
getRoot
public ServiceHandle<?> getRoot()
Returns theServiceHandle
root associated with this contextual creation- Returns:
- The possibly null root associated with this creation
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-