Package com.google.dart.engine.ast

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


    }
    // Report error if the (x/y) has toInt() invoked on it
    if (node.getParent() instanceof ParenthesizedExpression) {
      ParenthesizedExpression parenthesizedExpression = wrapParenthesizedExpression((ParenthesizedExpression) node.getParent());
      if (parenthesizedExpression.getParent() instanceof MethodInvocation) {
        MethodInvocation methodInvocation = (MethodInvocation) parenthesizedExpression.getParent();
        if (TO_INT_METHOD_NAME.equals(methodInvocation.getMethodName().getName())
            && methodInvocation.getArgumentList().getArguments().isEmpty()) {
          errorReporter.reportErrorForNode(HintCode.DIVISION_OPTIMIZATION, methodInvocation);
          return true;
        }
      }
    }
View Full Code Here


   */
  private boolean checkForUseOfVoidResult(Expression expression) {
    if (expression == null || !(expression instanceof MethodInvocation)) {
      return false;
    }
    MethodInvocation methodInvocation = (MethodInvocation) expression;
    if (methodInvocation.getStaticType() == VoidTypeImpl.getInstance()) {
      SimpleIdentifier methodName = methodInvocation.getMethodName();
      errorReporter.reportErrorForNode(
          HintCode.USE_OF_VOID_RESULT,
          methodName,
          methodName.getName());
      return true;
View Full Code Here

        usedElement = prefixed.getStaticElement();
        info.periodEnd = prefixed.getPeriod().getEnd();
      }
    }
    if (parent instanceof MethodInvocation) {
      MethodInvocation invocation = (MethodInvocation) parent;
      if (invocation.getTarget() == prefixNode) {
        usedElement = invocation.getMethodName().getStaticElement();
        info.periodEnd = invocation.getPeriod().getEnd();
      }
    }
    // we need used Element
    if (usedElement == null) {
      return null;
View Full Code Here

    if (parent instanceof CommentReference) {
      return false;
    }
    // qualified method invocation
    if (parent instanceof MethodInvocation) {
      MethodInvocation invocation = (MethodInvocation) parent;
      if (invocation.getMethodName() == node && invocation.getRealTarget() != null) {
        return false;
      }
    }
    // qualified property access
    if (parent instanceof PropertyAccess) {
View Full Code Here

TOP

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

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.