javax.enterprise.util
Class TypeLiteral<T>

java.lang.Object
  extended by javax.enterprise.util.TypeLiteral<T>
Type Parameters:
T - the type, including all actual type parameters

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

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>> type = new TypeLiteral<List<String>>() {};
 

Author:
Gavin King, Pete Muir
See Also:
Instance.select(TypeLiteral, Annotation...), Event.select(TypeLiteral, Annotation...)

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

Constructor Detail

TypeLiteral

protected TypeLiteral()
Method Detail

getType

public final java.lang.reflect.Type getType()
Returns:
the actual type represented by type literal

getRawType

public final java.lang.Class<T> getRawType()
Returns:
the raw type represented by the type literal


Copyright © 2008-2009 Seam Framework. All Rights Reserved.