Class JavaVersions


  • public class JavaVersions
    extends java.lang.Object
    Utilities for dealing with different Java specification versions.
    Author:
    Abe White, Pinaki Poddar
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int VERSION
      Java version; one of 2, 3, 4, 5, 6, 7, or later.
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaVersions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Class<?>[] getParameterizedTypes​(java.lang.reflect.Field f)
      Collects the parameterized type declarations for a given field.
      static java.lang.Class<?>[] getParameterizedTypes​(java.lang.reflect.Method meth)
      Collects the parameterized return type declarations for a given method.
      • Methods inherited from class java.lang.Object

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

      • VERSION

        public static final int VERSION
        Java version; one of 2, 3, 4, 5, 6, 7, or later.
    • Constructor Detail

      • JavaVersions

        public JavaVersions()
    • Method Detail

      • getParameterizedTypes

        public static java.lang.Class<?>[] getParameterizedTypes​(java.lang.reflect.Field f)
        Collects the parameterized type declarations for a given field.
      • getParameterizedTypes

        public static java.lang.Class<?>[] getParameterizedTypes​(java.lang.reflect.Method meth)
        Collects the parameterized return type declarations for a given method.