code: public static List<Type> typeParamImplementations(Class theClass, Class rootClass) {
          if (rootClass.getTypeParameters().length == 0) {
              return C.list();
          }
          try {
              return typeParamImplementations(theClass, rootClass, new ArrayList<Type>(), true);
          } catch (IndexOutOfBoundsException e) {
              throw new IllegalArgumentException(S.fmt("Cannot infer type parameter implementation on %s against %s", theClass.getName(), rootClass.getName()), e);
          }
      }
docs: Returns implementation of type parameters declared in the root class/interface by the given sub class
  <p>
  For example, suppose a super class has generic type params: `MyBase&lt;MODEL, QUERY&gt;`, and a
  sub class is declared as `MyModel&lt;MyModel, MyQuery&gt;`, then passing `MyModel.class` to
  this method shall return a list of `{MyModel.class, MyQuery.class}`
  <p>
  <p>
  If the specified class doesn't have generic type declared then it shall return
  an empty list
  
  @param theClass  the end class
  @param rootClass the root class or interface
  @return a list of type variable implementation on root class