org.jtheque.utils
Class GenericsUtils

java.lang.Object
  extended by org.jtheque.utils.GenericsUtils

public final class GenericsUtils
extends Object

A generic class utils.

Author:
Ian Robertson, Baptiste Wicht

Method Summary
static
<T> Collection<Class<?>>
getTypeArguments(Class<T> baseClass, Type childClass)
          Get the actual type arguments a child class has used to extend a generic base class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTypeArguments

public static <T> Collection<Class<?>> getTypeArguments(Class<T> baseClass,
                                                        Type childClass)
Get the actual type arguments a child class has used to extend a generic base class.

Type Parameters:
T - The type.
Parameters:
baseClass - the base class
childClass - the child class
Returns:
a list of the raw classes for the actual type arguments.


Copyright © 2010 JTheque. All Rights Reserved.