Package com.google.dart.engine.ast

Examples of com.google.dart.engine.ast.ClassMember


        // Do lookups in the enclosing class (and the inherited member) if the member is a method or
        // a setter for StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER warning.
        if (isMethod) {
          String setterName = name.getName() + "=";
          Element enclosingElementOfSetter = null;
          ClassMember conflictingSetter = memberHashMap.get(setterName);
          if (conflictingSetter != null) {
            enclosingElementOfSetter = conflictingSetter.getElement().getEnclosingElement();
          } else {
            ExecutableElement elementFromInheritance = inheritanceManager.lookupInheritance(
                enclosingClass,
                setterName);
            if (elementFromInheritance != null) {
              enclosingElementOfSetter = elementFromInheritance.getEnclosingElement();
            }
          }
          if (enclosingElementOfSetter != null) {
            // report problem
            errorReporter.reportErrorForNode(
                StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER,
                name,
                enclosingClass.getDisplayName(),
                name.getName(),
                enclosingElementOfSetter.getDisplayName());
            foundError |= true;
            addThisMemberToTheMap = false;
          }
        } else if (isSetter) {
          String methodName = name.getName();
          ClassMember conflictingMethod = memberHashMap.get(methodName);
          if (conflictingMethod != null && conflictingMethod instanceof MethodDeclaration
              && !((MethodDeclaration) conflictingMethod).isGetter()) {
            // report problem
            errorReporter.reportErrorForNode(
                StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2,
View Full Code Here

TOP

Related Classes of com.google.dart.engine.ast.ClassMember

Copyright © 2018 www.massapicom. 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.