info.magnolia.i18nsystem.util
Class GenericsUtils
java.lang.Object
info.magnolia.i18nsystem.util.GenericsUtils
public class GenericsUtils
- extends Object
Utility methods to work with generics.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericsUtils
public GenericsUtils()
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.