code: public TypeMirror overriddenType(ExecutableElement method) {
          if (utils.isStatic(method)) {
              return null;
          }
          MethodSymbol sym = (MethodSymbol)method;
          ClassSymbol origin = (ClassSymbol) sym.owner;
          for (com.sun.tools.javac.code.Type t = toolEnv.getTypes().supertype(origin.type);
                  t.hasTag(com.sun.tools.javac.code.TypeTag.CLASS);
                  t = toolEnv.getTypes().supertype(t)) {
              ClassSymbol c = (ClassSymbol) t.tsym;
              for (com.sun.tools.javac.code.Symbol sym2 : c.members().getSymbolsByName(sym.name)) {
                  if (sym.overrides(sym2, origin, toolEnv.getTypes(), true)) {
                      return t;
                  }
              }
          }
          return null;
      }
docs: Return the type containing the method that this method overrides.
  It may be a <code>TypeElement</code> or a <code>TypeParameterElement</code>.
  @param method target
  @return a type