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) ClassReflectionHelper
getHelper()
Instance
getInstance(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.Object
getMetadata()
Gets information about this type.java.lang.String
getName()
A unique identifier for this typevoid
setMetadata(java.lang.Object metadata)
Sets an object containing information about this type.java.lang.String
toString()
-
-
-
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:Type
A unique identifier for this type
-
getInstances
public java.util.Map<java.lang.String,Instance> getInstances()
Description copied from interface:Type
Returns a read-only map of the instances that are associated with this type- Specified by:
getInstances
in 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:Type
Gets the instance associated with this key, or null if there is none- Specified by:
getInstance
in 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:Type
Gets information about this type. Can be used to describe the type in some useful way- Specified by:
getMetadata
in interfaceType
- Returns:
- The possibly null metadata associated with this type
-
setMetadata
public void setMetadata(java.lang.Object metadata)
Description copied from interface:Type
Sets an object containing information about this type. Can be used to describe the type in some useful way- Specified by:
setMetadata
in interfaceType
- Parameters:
metadata
- The possibly null metadata to be associated with this type
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-