code: public static Class<?>[] getGenericParamTypes( Type genericType ) {
          Objects.requireNonNull(genericType, "Generic type is NULL!");
  
          try {
              if( genericType instanceof ParameterizedType ) {
                  Type[] genericTypes = ((ParameterizedType)genericType) .getActualTypeArguments();
                  Class<?>[] result = new Class<?>[ genericTypes.length ];
  
                  for( int i = 0; i < genericTypes.length; i++ ) {
                      if( genericTypes[i] instanceof Class<?> ) {
                          result[i] = (Class<?>) genericTypes[i];
                      }
                      else if( genericTypes[i] instanceof ParameterizedType ) {
                          Type rawType = ((ParameterizedType) genericTypes[i]) .getRawType();
                          result[i] = (Class<?>) rawType;
                      }
                      else {
                          // ignore it
                      }
                  }
  
                  return result;
              }
          }
          catch (Exception e) {
              ; // ignore it
          }
  
          return new Class<?>[0];
      }
docs: ////