Top Description Constructors Methods
com.fasterxml.classmate

public abstract Class GenericType<T>

extends Object
implements Type
Class Inheritance
All Implemented Interfaces
java.lang.reflect.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.

Note

before version 1.6 implemented java.io.Serializable. Removed due to issue #73.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

GenericTypeback to summary
protected GenericType()