info.magnolia.i18nsystem.util
Class GenericsUtils

java.lang.Object
  extended by info.magnolia.i18nsystem.util.GenericsUtils

public class GenericsUtils
extends Object

Utility methods to work with generics.


Constructor Summary
GenericsUtils()
           
 
Method Summary
static Type getGenericParameterType(ParameterizedType paramType)
           
static Type getGenericTypeOfReturnType(Method method)
          Gets the generic parameter of the return type of the given method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericsUtils

public GenericsUtils()
Method Detail

getGenericTypeOfReturnType

public static Type getGenericTypeOfReturnType(Method method)
Gets the generic parameter of the return type of the given method. If the return type of the given method is not parameterized, returns the return type of the method. If the return type of the given method has a single type parameter, return that type. If the return type of the given method is a Map and has two type parameters, return the second, which is normally that of the values.


getGenericParameterType

public static Type getGenericParameterType(ParameterizedType paramType)


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.