org.apache.openjpa.lib.util
Class JavaVersions

java.lang.Object
  extended by org.apache.openjpa.lib.util.JavaVersions

public class JavaVersions
extends Object

Utilities for dealing with different Java specification versions.

Author:
Abe White, Pinaki Poddar

Field Summary
static int VERSION
          Java version; one of 2, 3, 4, 5, 6, or 7.
 
Constructor Summary
JavaVersions()
           
 
Method Summary
(package private) static Class<?> extractClass(Type type)
          Extracts the class from the given argument, if possible.
static Class<?>[] getParameterizedTypes(Field f)
          Collects the parameterized type declarations for a given field.
static Class<?>[] getParameterizedTypes(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, or 7.

Constructor Detail

JavaVersions

public JavaVersions()
Method Detail

getParameterizedTypes

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


getParameterizedTypes

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


extractClass

static Class<?> extractClass(Type type)
                      throws Exception
Extracts the class from the given argument, if possible. Null otherwise.

Throws:
Exception


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.