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 ; }
Traverses the type hierarchy up until a type information factory can be found .