Examples of astName()


Examples of lombok.ast.AnnotationElement.astName()

      a.rawAnnotationTypeReference(toTree(node.getAnnotationType(), FlagKey.TYPE_REFERENCE));
      for (JCExpression elem : node.getArguments()) {
        AnnotationElement e = new AnnotationElement();
        if (elem instanceof JCAssign) {
          JCExpression rawName = ((JCAssign) elem).getVariable();
          if (rawName instanceof JCIdent) e.astName(setPos(rawName, new Identifier().astValue(((JCIdent)rawName).getName().toString())));
          elem = ((JCAssign) elem).getExpression();
        }
        e.rawValue(toTree(elem));
        a.astElements().addToEnd(e);
      }
View Full Code Here

Examples of lombok.ast.EnumConstant.astName()

            JCVariableDecl vd = (JCVariableDecl) def;
            if (vd.mods != null && (vd.mods.flags & ENUM_CONSTANT_FLAGS) == ENUM_CONSTANT_FLAGS) {
              // This is an enum constant, not a field of the enum class.
              EnumConstant ec = new EnumConstant();
              setPos(def, ec);
              ec.astName(new Identifier().astValue(vd.getName().toString()));
              fillList(vd.mods.annotations, ec.rawAnnotations());
              if (vd.init instanceof JCNewClass) {
                JCNewClass init = (JCNewClass) vd.init;
                fillList(init.getArguments(), ec.rawArguments());
                if (init.getClassBody() != null) {
View Full Code Here

Examples of lombok.ast.EnumDeclaration.astName()

    return posify(body);
  }
 
  public Node createEnumDeclaration(Node modifiers, Node name, Node body, List<Node> addons) {
    EnumDeclaration decl = new EnumDeclaration();
    decl.astName(createIdentifierIfNeeded(name, currentPos())).rawBody(body);
    if (modifiers != null) decl.astModifiers(createModifiersIfNeeded(modifiers, currentPos()));
    if (addons != null) for (Node n : addons) {
      //if (n instanceof ExtendsClause) //TODO add error node: implements not allowed here.
      if (n instanceof TemporaryNode.ImplementsClause) {
        //if (!decl.implementing().isEmpty()) //TODO add error node: multiple implements clauses.
View Full Code Here

Examples of lombok.ast.MethodInvocation.astName()

          return;
        }
        setPos(sel, id.astValue(name));
        sel = ((JCFieldAccess) sel).getExpression();
      }
      inv.astName(id).rawOperand(toTree(sel));
      fillList(node.getTypeArguments(), inv.rawMethodTypeArguments(), FlagKey.TYPE_REFERENCE);
      fillList(node.getArguments(), inv.rawArguments());
      set(node, inv);
    }
   
View Full Code Here

Examples of lombok.ast.MethodInvocation.astName()

                VariableReference reference = (VariableReference) expression;
                String variable = reference.astIdentifier().astValue();
                return mTypes.get(variable);
            } else if (expression instanceof MethodInvocation) {
                MethodInvocation method = (MethodInvocation) expression;
                String methodName = method.astName().astValue();
                if (methodName.equals(GET_STRING_METHOD)) {
                    return String.class;
                }
            } else if (expression instanceof StringLiteral) {
                return String.class;
View Full Code Here

Examples of lombok.ast.TypeDeclaration.astName()

        enumDecl.astBody(body);
      } else {
        throw new IllegalStateException("Unknown type declaration: " + node);
      }
     
      typeDecl.astName(new Identifier().astValue(name));
      typeDecl.astModifiers((Modifiers) toTree(node.mods));
      addJavadoc(typeDecl, node.mods);
      set(node, typeDecl);
    }
   
View Full Code Here

Examples of lombok.ast.TypeVariable.astName()

      }
    }
   
    @Override public void visitTypeParameter(JCTypeParameter node) {
      TypeVariable var = new TypeVariable();
      var.astName(setPos(node, new Identifier().astValue(node.name.toString())));
      fillList(node.bounds, var.rawExtending(), FlagKey.TYPE_REFERENCE);
      set(node, var);
    }
   
    @Override public void visitTypeArray(JCArrayTypeTree node) {
View Full Code Here

Examples of lombok.ast.VariableDefinitionEntry.astName()

                    }
                    current = current.getParent();
                }
                if (current instanceof VariableDefinitionEntry) {
                    VariableDefinitionEntry entry = (VariableDefinitionEntry) current;
                    String variable = entry.astName().astValue();
                    mMap.put(variable, reference);
                }
            }

            return false;
View Full Code Here

Examples of lombok.ast.VariableDefinitionEntry.astName()

   
    for (JCVariableDecl varDecl : decls) {
      int extraDims = countDims(varDecl.vartype) - baseDims;
      VariableDefinitionEntry entry = new VariableDefinitionEntry();
      entry.astArrayDimensions(extraDims);
      entry.astName(setPos(varDecl, new Identifier().astValue(varDecl.name.toString())));
      entry.rawInitializer(toTree(varDecl.init));
      setPos(varDecl, entry);
      if (extraDims > 0) {
        JCArrayTypeTree arrayType = (JCArrayTypeTree) varDecl.vartype;
        for (int i = 0; i < extraDims; i++) {
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.