object/src/main/java/com/orientechnologies/common/reflection/OReflectionHelper.java
public static Type[] getGenericTypes(final Class<?> iClass) {
    final Type genericType = iClass.getGenericInterfaces()[0];
    if (genericType != null && genericType instanceof ParameterizedType) {
      final ParameterizedType pt = (ParameterizedType) genericType;
      if (pt.getActualTypeArguments() != null && pt.getActualTypeArguments().length > 1)
        return pt.getActualTypeArguments();
    }
    return null;
  }
public static Type[] getGenericTypes(final Class<?> iClass) {
    final Type genericType = iClass.getGenericInterfaces()[0];
    if (genericType != null && genericType instanceof ParameterizedType) {
      final ParameterizedType pt = (ParameterizedType) genericType;
      if (pt.getActualTypeArguments() != null && pt.getActualTypeArguments().length > 1)
        return pt.getActualTypeArguments();
    }
    return null;
  }
public static Type [ ] getGenericTypes ( final Class < ? > iClass ) { final Type genericType = iClass . getGenericInterfaces ( ) [ 0 ] ; if ( genericType != null && genericType instanceof ParameterizedType ) { final ParameterizedType pt = ( ParameterizedType ) genericType ; if ( pt . getActualTypeArguments ( ) != null && pt . getActualTypeArguments ( ) . length > 1 ) return pt . getActualTypeArguments ( ) ; } return null ; }
Returns the declared generic types of a class.

@param iClass
Class to examine
@return The array of Type if any, otherwise null
Returns the declared generic types of a class .