Package lombok.ast

Examples of lombok.ast.ConstructorInvocation


      expr.astOperator(JcTreeBuilder.BINARY_OPERATORS.inverse().get(getTag(node)));
      set(node, expr);
    }
   
    @Override public void visitNewClass(JCNewClass node) {
      ConstructorInvocation inv = new ConstructorInvocation();
      fillList(node.getArguments(), inv.rawArguments());
      fillList(node.getTypeArguments(), inv.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
      inv.rawTypeReference(toTree(node.getIdentifier(), FlagKey.TYPE_REFERENCE));
      inv.rawQualifier(toTree(node.getEnclosingExpression()));
      Node n = toTree(node.getClassBody());
      if (n instanceof TypeDeclaration) {
        NormalTypeBody body = ((ClassDeclaration) n).astBody();
        if (body != null) body.unparent();
        inv.rawAnonymousClassBody(setPos(node.getClassBody(), body));
      }
      set(node, inv);
    }
View Full Code Here


      }
    } else {
      positionSpan(typeReference, identifier, classTypeArgs);
    }
   
    ConstructorInvocation constructorInvocation = new ConstructorInvocation()
        .rawTypeReference(typeReference)
        .rawAnonymousClassBody(classBody);
   
    if (constructorTypeArgs instanceof TemporaryNode.TypeArguments) {
      for (Node arg : ((TemporaryNode.TypeArguments)constructorTypeArgs).arguments) {
        constructorInvocation.rawConstructorTypeArguments().addToEnd(arg);
      }
    }
   
    if (methodArguments instanceof TemporaryNode.MethodArguments) {
      for (Node arg : ((TemporaryNode.MethodArguments)methodArguments).arguments) {
        constructorInvocation.rawArguments().addToEnd(arg);
      }
    }
   
    return posify(constructorInvocation);
  }
View Full Code Here

      return posify(ref);
    }
  }
 
  public Node createUnqualifiedConstructorInvocation(Node constructorTypeArgs, Node type, Node args, Node anonymousClassBody) {
    ConstructorInvocation result = new ConstructorInvocation()
        .rawTypeReference(type)
        .rawAnonymousClassBody(anonymousClassBody);
   
    if (constructorTypeArgs instanceof TemporaryNode.TypeArguments) {
      for (Node arg : ((TemporaryNode.TypeArguments)constructorTypeArgs).arguments) {
        result.rawConstructorTypeArguments().addToEnd(arg);
      }
    }
   
    if (args instanceof TemporaryNode.MethodArguments) {
      for (Node arg : ((TemporaryNode.MethodArguments)args).arguments) {
        result.rawArguments().addToEnd(arg);
      }
    } else DanglingNodes.addDanglingNode(result, args);
   
    return posify(result);
  }
View Full Code Here

TOP

Related Classes of lombok.ast.ConstructorInvocation

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.