code: public boolean overrides(ExecutableElement e1, ExecutableElement e2, TypeElement cls) {
          MethodSymbol rider = (MethodSymbol)e1;
          MethodSymbol ridee = (MethodSymbol)e2;
          ClassSymbol origin = (ClassSymbol)cls;
  
          return rider.name == ridee.name &&
  
                 // not reflexive as per JLS
                 rider != ridee &&
  
                 // we don't care if ridee is static, though that wouldn't
                 // compile
                 !rider.isStatic() &&
  
                 // Symbol.overrides assumes the following
                 ridee.isMemberOf(origin, toolEnv.getTypes()) &&
  
                 // check access, signatures and check return types
                 rider.overrides(ridee, origin, toolEnv.getTypes(), true);
      }
docs: with the call in overrideType(....), the method above.