public static Type [ ] getActualTypeArguments ( Class < ? > clazz ) { Type type = Types . getCanonicalType ( clazz ) ; if ( type instanceof ParameterizedType ) { return ( ( ParameterizedType ) type ) . getActualTypeArguments ( ) ; } else { return EMPTY_TYPES ; } }
Gets the actual type arguments of a class