protected void registerAllTypeVariables ( Type classType ) { Queue < Type > typesToRegister = new LinkedList < Type > ( ) ; Set < Type > registeredTypes = new HashSet < Type > ( ) ; typesToRegister . add ( classType ) ; while ( ! typesToRegister . isEmpty ( ) ) { Type typeToRegister = typesToRegister . poll ( ) ; if ( typeToRegister == null || registeredTypes . contains ( typeToRegister ) ) { continue ; } registerTypeVariablesOn ( typeToRegister ) ; registeredTypes . add ( typeToRegister ) ; Class < ? > rawType = extractRawTypeOf ( typeToRegister ) ; typesToRegister . add ( rawType . getGenericSuperclass ( ) ) ; typesToRegister . addAll ( Arrays . asList ( rawType . getGenericInterfaces ( ) ) ) ; } }
Registers the type variables for the given type and all of its superclasses and superinterfaces .