java.lang.Object
org.glassfish.hk2.api.TypeLiteral<T>
- Type Parameters:
T-
Supports inline instantiation of objects that represent parameterized
types with actual type parameters.
An object that represents any parameterized type may be obtained by
subclassing
TypeLiteral.
TypeLiteral<List<String>> stringListType = new TypeLiteral<List<String>>() {};
-
Constructor Details
-
TypeLiteral
protected TypeLiteral()
-
-
Method Details
-
getType
- Returns:
- the actual type represented by this object
-
getParameterTypes
Gets the types associated with this literal- Returns:
- A non-null (but possibly empty) array of types associated with this literal
-
getRawType
- Returns:
- the raw type represented by this object
-
getRawType
Gets the base associated class from this type- Parameters:
type- The non-null type to analyze- Returns:
- The base class for the type, or null if there is none (e.g., Wildcard)
-
equals
-
hashCode
public int hashCode() -
toString
-