Package org.int4.dirk.api
Class TypeLiteral<T>
- java.lang.Object
-
- org.int4.dirk.api.TypeLiteral<T>
-
- Type Parameters:
T- the type represented
public abstract class TypeLiteral<T> extends java.lang.ObjectAllows creation of parameterized types by sub-classing this class.For example, to create a type
List<? extends String>write:Type type = new TypeLiteral<List<? extends String>>() {}.getType()
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedTypeLiteral()Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<T>getRawType()Returns the raw type.java.lang.reflect.TypegetType()Returns the type represented.
-
-
-
Method Detail
-
getType
public final java.lang.reflect.Type getType()
Returns the type represented.- Returns:
- the type represented, never
null
-
getRawType
public final java.lang.Class<T> getRawType()
Returns the raw type.- Returns:
- the raw type, never
null
-
-