javax.enterprise.util
Class TypeLiteral<T>

java.lang.Object
  extended by javax.enterprise.util.TypeLiteral<T>
All Implemented Interfaces:
java.io.Serializable

public abstract class TypeLiteral<T>
extends java.lang.Object
implements java.io.Serializable

Convenience API to create runtime parameterized types.

 new TypeLiteral<ArrayList<String>>() {}
 

See Also:
Serialized Form

Constructor Summary
protected TypeLiteral()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.lang.Class<T> getRawType()
           
 java.lang.reflect.Type getType()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeLiteral

protected TypeLiteral()
Method Detail

getType

public final java.lang.reflect.Type getType()

getRawType

public final java.lang.Class<T> getRawType()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object