com.fasterxml.classmate
Class GenericType<T>

java.lang.Object
  extended by com.fasterxml.classmate.GenericType<T>
All Implemented Interfaces:
Serializable, Type

public abstract class GenericType<T>
extends Object
implements Serializable, Type

This class is used to pass full generics type information, and avoid problems with type erasure (that basically removes most usable type references from runtime Class objects). It is based on ideas from http://gafter.blogspot.com/2006/12/super-type-tokens.html,

Usage is by sub-classing: here is one way to instantiate reference to generic type List<Integer>:

  GenericType type = new GenericType<List<Integer>>() { };
which can be passed to methods that accept GenericReference.

See Also:
Serialized Form

Constructor Summary
protected GenericType()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericType

protected GenericType()


Copyright © 2012 fasterxml.com. All Rights Reserved.