Class TypeVariables


  • public class TypeVariables
    extends java.lang.Object
    Support functions for type variables.
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeVariables()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.lang.reflect.TypeVariable<java.lang.Class<T>> get​(java.lang.Class<?> cls, int index)
      Extracts the type variable at the given index from the given Class.
      • Methods inherited from class java.lang.Object

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

      • TypeVariables

        public TypeVariables()
    • Method Detail

      • get

        public static <T> java.lang.reflect.TypeVariable<java.lang.Class<T>> get​(java.lang.Class<?> cls,
                                                                                 int index)
        Extracts the type variable at the given index from the given Class.
        Type Parameters:
        T - the type of the class
        Parameters:
        cls - a Class, cannot be null
        index - an index, ranging from 0 to the amount of type variables - 1, cannot be negative
        Returns:
        a TypeVariable, never null
        Throws:
        java.lang.NullPointerException - when the given class was null
        java.lang.IndexOutOfBoundsException - when an index was given outside the valid range