Examples of overrides()


Examples of com.sun.mirror.util.Declarations.overrides()

        Declarations declUtil = env.getDeclarationUtils();

        while(true) {
            for (MethodDeclaration m : sc.getMethods()) {
                if(declUtil.overrides(method,m))
                    return true;
            }

            if(sc.getSuperclass()==null)
                return false;
View Full Code Here

Examples of com.sun.mirror.util.Declarations.overrides()

          while (candidate instanceof DecoratedDeclaration) {
            //unwrap the candidate.
            candidate = ((DecoratedDeclaration) candidate).getDelegate();
          }

          if (decls.overrides((MethodDeclaration) candidate, (MethodDeclaration) unwrappedMethod)) {
            return true;
          }
        }

        declaringType = ((ClassDeclaration) declaringType).getSuperclass().getDeclaration();
View Full Code Here

Examples of com.sun.mirror.util.Declarations.overrides()

      while (candidate instanceof DecoratedDeclaration) {
        //unwrap the candidate.
        candidate = ((DecoratedDeclaration) candidate).getDelegate();
      }

      if (decls.overrides((MethodDeclaration) candidate, (MethodDeclaration) unwrappedMethod)) {
        return true;
      }
    }

    return false;
View Full Code Here

Examples of com.sun.mirror.util.Declarations.overrides()

        Declarations declUtil = env.getDeclarationUtils();

        while(true) {
            for (MethodDeclaration m : sc.getMethods()) {
                if(declUtil.overrides(method,m))
                    return true;
            }

            if(sc.getSuperclass()==null)
                return false;
View Full Code Here

Examples of com.sun.mirror.util.Declarations.overrides()

        Declarations declUtil = env.getDeclarationUtils();

        while(true) {
            for (MethodDeclaration m : sc.getMethods()) {
                if(declUtil.overrides(method,m))
                    return true;
            }

            if(sc.getSuperclass()==null)
                return false;
View Full Code Here

Examples of com.sun.mirror.util.Declarations.overrides()

        Declarations declUtil = env.getDeclarationUtils();

        while(true) {
            for (MethodDeclaration m : sc.getMethods()) {
                if(declUtil.overrides(method,m))
                    return true;
            }

            if(sc.getSuperclass()==null)
                return false;
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.overrides()

                if (o instanceof Candidate) {
                    Symbol s1 = this.sym;
                    Symbol s2 = ((Candidate)o).sym;
                    if  ((s1 != s2 &&
                        (s1.overrides(s2, s1.owner.type.tsym, types, false) ||
                        (s2.overrides(s1, s2.owner.type.tsym, types, false)))) ||
                        ((s1.isConstructor() || s2.isConstructor()) && s1.owner != s2.owner))
                        return true;
                }
                return false;
            }
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.overrides()

            finally {
                log.deferDiagnostics = prevDeferDiags;
                log.deferredDiagnostics = prevDeferredDiags;
            }
            if (close.kind == MTH &&
                    close.overrides(syms.autoCloseableClose, resource.tsym, types, true) &&
                    chk.isHandled(syms.interruptedExceptionType, types.memberType(resource, close).getThrownTypes()) &&
                    env.info.lint.isEnabled(LintCategory.TRY)) {
                log.warning(LintCategory.TRY, pos, "try.resource.throws.interrupted.exc", resource);
            }
        }
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.overrides()

        if (sitesym != null &&
                sitesym.kind == VAR &&
                ((VarSymbol)sitesym).isResourceVariable() &&
                sym.kind == MTH &&
                sym.name.equals(names.close) &&
                sym.overrides(syms.autoCloseableClose, sitesym.type.tsym, types, true) &&
                env.info.lint.isEnabled(LintCategory.TRY)) {
            log.warning(LintCategory.TRY, tree, "try.explicit.close.call");
        }

        // Disallow selecting a type from an expression
View Full Code Here

Examples of com.sun.tools.javac.code.Symbol.overrides()

        Symbol descSym = findDescriptorSymbol(origin);
        CompoundScope members = membersClosure(origin.type, false);
        ListBuffer<Symbol> overridden = new ListBuffer<>();
        outer: for (Symbol m2 : members.getElementsByName(descSym.name, bridgeFilter)) {
            if (m2 == descSym) continue;
            else if (descSym.overrides(m2, origin, Types.this, false)) {
                for (Symbol m3 : overridden) {
                    if (isSameType(m3.erasure(Types.this), m2.erasure(Types.this)) ||
                            (m3.overrides(m2, origin, Types.this, false) &&
                            (pendingBridges((ClassSymbol)origin, m3.enclClass()) ||
                            (((MethodSymbol)m2).binaryImplementation((ClassSymbol)m3.owner, Types.this) != null)))) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.