/** * Returns the position of the type variable for the class in which it is * declared. * * @param typeVariable The type variable for which the position should be retrieved * @return The position of the type variable within the class in which it is * declared. */ public static int getTypeVariablePosition(TypeVariable<?> typeVariable) { return getTypeVariablePosition(typeVariable.getGenericDeclaration(), typeVariable); }
int position = getTypeVariablePosition(typeVariable); position = getTypeVariablePosition(classToInspect, (TypeVariable<?>) resolvedType); classThatContainsTypeVariable = getClassThatContainsTypeVariable((TypeVariable<?>) resolvedType);