code: private static <OUT> TypeInfoFactory<? super OUT> getClosestFactory(ArrayList<Type> typeHierarchy, Type t) {
  		TypeInfoFactory factory = null;
  		while (factory == null && isClassType(t) && !(typeToClass(t).equals(Object.class))) {
  			typeHierarchy.add(t);
  			factory = getTypeInfoFactory(t);
  			t = typeToClass(t).getGenericSuperclass();
  
  			if (t == null) {
  				break;
  			}
  		}
  		return factory;
  	}
docs: Traverses the type hierarchy up until a type information factory can be found.
  
  @param typeHierarchy hierarchy to be filled while traversing up
  @param t type for which a factory needs to be found
  @return closest type information factory or null if there is no factory in the type hierarchy