@SuppressWarnings("raw") public static Type resolveTypeVariable(TypeVariable name,Class declaringClass,Class topClass){
  Type type=resolveTypeVariable(name,declaringClass,new HashMap<>(),topClass);
  if (type == null) {
    type=Object.class;
  }
  return type;
}

@ SuppressWarnings ( "raw" ) public static Type resolveTypeVariable ( TypeVariable name , Class declaringClass , Class topClass ) { Type type = resolveTypeVariable ( name , declaringClass , new HashMap < > ( ) , topClass ) ; if ( type == null ) { type = Object . class ; } return type ; }
given a type variable , find what it resolves to given the declaring class where type variable was found and a top class that extends the declaring class .
