javax.enterprise.util
T
- the type, including all actual type parameterspublic abstract class TypeLiteral<T> extends java.lang.Object implements java.io.Serializable
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>>() {};
Modifier | Constructor and Description |
---|---|
protected |
TypeLiteral() |
public final java.lang.reflect.Type getType()
public final java.lang.Class<T> getRawType()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object