Class TypeReference<T>

  • All Implemented Interfaces:
    java.lang.reflect.Type

    public class TypeReference<T>
    extends java.lang.Object
    implements java.lang.reflect.Type
    Reference to a type. This class should be used as an extension of an inner class. E.g.
     new TypeReference>() {}
     
    The type then gets encoded in the generic super class of the instance.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TypeReference()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.reflect.Type getType()  
      java.lang.String getTypeName()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TypeReference

        protected TypeReference()
    • Method Detail

      • getType

        public java.lang.reflect.Type getType()
      • getTypeName

        public java.lang.String getTypeName()
        Specified by:
        getTypeName in interface java.lang.reflect.Type
      • toString

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