code: public static Class<?> findGenericClass(final Class<?> mainClass, final Class<?> assignableClass) {
          return findGenericClass(mainClass, new Class<?>[] { assignableClass });
      }
docs: Return the generic class for the given parent class and index.
  
  @param mainClass the parent class
  @param assignableClass the parent type of the generic to build
  
  @return the class of the generic type according to the index provided or null if not found