Examples of SuperConstructorInvocation


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

          DartObjectImpl value = ((ValidResult) evaluationResult).getValue();
          String fieldName = constructorFieldInitializer.getFieldName().getName();
          fieldMap.put(fieldName, value);
        }
      } else if (initializer instanceof SuperConstructorInvocation) {
        SuperConstructorInvocation superConstructorInvocation = (SuperConstructorInvocation) initializer;
        SimpleIdentifier name = superConstructorInvocation.getConstructorName();
        if (name != null) {
          superName = name.getName();
        }
        superArguments = superConstructorInvocation.getArgumentList().getArguments();
      }
    }
    // Evaluate explicit or implicit call to super().
    InterfaceType superclass = definingClass.getSuperclass();
    if (superclass != null && !superclass.isObject()) {
View Full Code Here

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

    }

    @Override
    public SuperConstructorInvocation visitSuperConstructorInvocation(
        SuperConstructorInvocation node) {
      SuperConstructorInvocation invocation = super.visitSuperConstructorInvocation(node);
      invocation.setStaticElement(node.getStaticElement());
      return invocation;
    }
View Full Code Here

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

      if (initializer instanceof RedirectingConstructorInvocation) {
        RedirectingConstructorInvocation invocation = (RedirectingConstructorInvocation) initializer;
        validateInitializerInvocationArguments(parameterElements, invocation.getArgumentList());
      }
      if (initializer instanceof SuperConstructorInvocation) {
        SuperConstructorInvocation invocation = (SuperConstructorInvocation) initializer;
        validateInitializerInvocationArguments(parameterElements, invocation.getArgumentList());
      }
    }
  }
View Full Code Here

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

      return true;
    }
    // try to find and check super constructor invocation
    for (ConstructorInitializer initializer : node.getInitializers()) {
      if (initializer instanceof SuperConstructorInvocation) {
        SuperConstructorInvocation superInvocation = (SuperConstructorInvocation) initializer;
        ConstructorElement element = superInvocation.getStaticElement();
        if (element == null || element.isConst()) {
          return false;
        }
        errorReporter.reportErrorForNode(
            CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER,
View Full Code Here

Examples of lombok.ast.SuperConstructorInvocation

    }
    return posify(result);
  }
 
  public Node createSuperConstructorInvocation(org.parboiled.Node<Node> dot, Node qualifier, Node typeArguments, Node arguments) {
    SuperConstructorInvocation result = new SuperConstructorInvocation().rawQualifier(qualifier);
   
    if (typeArguments instanceof TemporaryNode.TypeArguments) {
      for (Node arg : ((TemporaryNode.TypeArguments)typeArguments).arguments) {
        result.rawConstructorTypeArguments().addToEnd(arg);
      }
    }
   
    if (arguments instanceof TemporaryNode.MethodArguments) {
      for (Node arg : ((TemporaryNode.MethodArguments)arguments).arguments) {
        result.rawArguments().addToEnd(arg);
      }
    }
    if (dot != null) source.registerStructure(result, dot);
    return posify(result);
  }
View Full Code Here

Examples of lombok.ast.SuperConstructorInvocation

          setConversionPositionInfo(aci, "this", getPosition(sel));
          return;
        }
       
        if ("super".equals(name)) {
          SuperConstructorInvocation sci = new SuperConstructorInvocation();
          fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
          fillList(node.getArguments(), sci.rawArguments());
          set(node, sci);
          setConversionPositionInfo(sci, "super", getPosition(sel));
          return;
        }
       
        setPos(sel, id.astValue(name));
        sel = null;
      } else if (sel instanceof JCFieldAccess) {
        String name = ((JCFieldAccess) sel).getIdentifier().toString();
        if ("super".equals(name)) {
          SuperConstructorInvocation sci = new SuperConstructorInvocation();
          fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
          fillList(node.getArguments(), sci.rawArguments());
          sci.rawQualifier(toTree(((JCFieldAccess) sel).getExpression()));
          set(node, sci);
          setConversionPositionInfo(sci, "super", getPosition(sel));
          return;
        }
        setPos(sel, id.astValue(name));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.SuperConstructorInvocation

          this.findFormalsForVariable(ctorCall);
      break;
    }

    case ASTNode.SUPER_CONSTRUCTOR_INVOCATION: {
      final SuperConstructorInvocation ctorCall = (SuperConstructorInvocation) node;
      // if coming up from a argument.
      if (containedIn(ctorCall.arguments(), this.name))
        // if we don't have the source, no can do.
        if (!ctorCall.resolveConstructorBinding().getDeclaringClass()
            .isFromSource())
          throw new DefinitelyNotEnumerizableException(
              Messages.ASTNodeProcessor_SourceNotPresent, node);
        else
          // go find the formals.
View Full Code Here

Examples of org.eclipse.jdt.core.dom.SuperConstructorInvocation

      variableDeclaration.setName(ast.newSimpleName(varNames[index]));
      constructor.parameters().add(variableDeclaration);
    }

    Block block = ast.newBlock();
    SuperConstructorInvocation constructorInvocation = ast
        .newSuperConstructorInvocation();

    for (int index = 0; index < varNames.length; index++) {
      constructorInvocation.arguments().add(
          ast.newSimpleName(varNames[index]));
    }

    block.statements().add(constructorInvocation);
    constructor.setBody(block);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.SuperConstructorInvocation

    }

    //
    // Remove super invocation in the constructor
    //
    SuperConstructorInvocation sci = visitor.getSuperConstructorInvocation();
    if (sci != null) {
      result.remove(sci, 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.