Class TypeImpl
- java.lang.Object
-
- org.glassfish.hk2.configuration.hub.internal.TypeImpl
-
-
Constructor Summary
Constructors Constructor Description TypeImpl(Type baseType, ClassReflectionHelper helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) ClassReflectionHelpergetHelper()InstancegetInstance(java.lang.String key)Gets the instance associated with this key, or null if there is nonejava.util.Map<java.lang.String,Instance>getInstances()Returns a read-only map of the instances that are associated with this typejava.lang.ObjectgetMetadata()Gets information about this type.java.lang.StringgetName()A unique identifier for this typevoidsetMetadata(java.lang.Object metadata)Sets an object containing information about this type.java.lang.StringtoString()
-
-
-
Field Detail
-
name
private final java.lang.String name
-
instances
private final java.util.Map<java.lang.String,Instance> instances
-
helper
private final ClassReflectionHelper helper
-
metadata
private java.lang.Object metadata
-
-
Constructor Detail
-
TypeImpl
TypeImpl(Type baseType, ClassReflectionHelper helper)
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:TypeA unique identifier for this type
-
getInstances
public java.util.Map<java.lang.String,Instance> getInstances()
Description copied from interface:TypeReturns a read-only map of the instances that are associated with this type- Specified by:
getInstancesin interfaceType- Returns:
- A read-only and possibly empty map of instances associated with this type
-
getInstance
public Instance getInstance(java.lang.String key)
Description copied from interface:TypeGets the instance associated with this key, or null if there is none- Specified by:
getInstancein interfaceType- Parameters:
key- The non-null key for the instance- Returns:
- The resulting instance or null if there is none
-
getHelper
ClassReflectionHelper getHelper()
-
getMetadata
public java.lang.Object getMetadata()
Description copied from interface:TypeGets information about this type. Can be used to describe the type in some useful way- Specified by:
getMetadatain interfaceType- Returns:
- The possibly null metadata associated with this type
-
setMetadata
public void setMetadata(java.lang.Object metadata)
Description copied from interface:TypeSets an object containing information about this type. Can be used to describe the type in some useful way- Specified by:
setMetadatain interfaceType- Parameters:
metadata- The possibly null metadata to be associated with this type
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-