Package org.glassfish.hk2.utilities
Class ContextualInput<T>
- java.lang.Object
-
- org.glassfish.hk2.utilities.ContextualInput<T>
-
public class ContextualInput<T> extends java.lang.ObjectUsed 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>descriptorprivate 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 booleanequals(java.lang.Object o)ActiveDescriptor<T>getDescriptor()Returns the descriptor associated with this contextual creationServiceHandle<?>getRoot()Returns theServiceHandleroot associated with this contextual creationinthashCode()java.lang.StringtoString()
-
-
-
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 theServiceHandleroot associated with this contextual creation- Returns:
- The possibly null root associated with this creation
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-