Examples of astBody()


Examples of lombok.ast.AnnotationDeclaration.astBody()

        AnnotationDeclaration annDecl = new AnnotationDeclaration();
        typeDecl = annDecl;
        NormalTypeBody body = new NormalTypeBody();
        flagKeyMap.put(FlagKey.METHODS_ARE_ANNMETHODS, FlagKey.METHODS_ARE_ANNMETHODS);
        fillList(node.defs, body.rawMembers(), flagKeyMap);
        annDecl.astBody(body);
      } else if ((flags & Flags.INTERFACE) != 0) {
        InterfaceDeclaration itfDecl = new InterfaceDeclaration();
        typeDecl = itfDecl;
        fillList(node.typarams, itfDecl.rawTypeVariables());
        fillList(node.implementing, itfDecl.rawExtending(), FlagKey.TYPE_REFERENCE);
View Full Code Here

Examples of lombok.ast.ClassDeclaration.astBody()

        fillList(node.implementing, classDecl.rawImplementing(), FlagKey.TYPE_REFERENCE);
        classDecl.rawExtending(toTree(node.extending, FlagKey.TYPE_REFERENCE));
        fillList(node.typarams, classDecl.rawTypeVariables());
        NormalTypeBody body = new NormalTypeBody();
        fillList(node.defs, body.rawMembers(), flagKeyMap);
        classDecl.astBody(body);
      } else if ((flags & Flags.ANNOTATION) != 0) {
        AnnotationDeclaration annDecl = new AnnotationDeclaration();
        typeDecl = annDecl;
        NormalTypeBody body = new NormalTypeBody();
        flagKeyMap.put(FlagKey.METHODS_ARE_ANNMETHODS, FlagKey.METHODS_ARE_ANNMETHODS);
View Full Code Here

Examples of lombok.ast.EnumConstant.astBody()

                JCNewClass init = (JCNewClass) vd.init;
                fillList(init.getArguments(), ec.rawArguments());
                if (init.getClassBody() != null) {
                  NormalTypeBody constantBody = setPos(init, new NormalTypeBody());
                  fillList(init.getClassBody().getMembers(), constantBody.rawMembers());
                  ec.astBody(constantBody);
                }
                setConversionPositionInfo(ec, "newClass", getPosition(init));
              }
              body.astConstants().addToEnd(ec);
              continue;
View Full Code Here

Examples of lombok.ast.EnumDeclaration.astBody()

          }
         
          defs.add(def);
        }
        fillList(defs, body.rawMembers(), flagKeyMap);
        enumDecl.astBody(body);
      } else {
        throw new IllegalStateException("Unknown type declaration: " + node);
      }
     
      typeDecl.astName(new Identifier().astValue(name));
View Full Code Here

Examples of lombok.ast.InterfaceDeclaration.astBody()

        typeDecl = itfDecl;
        fillList(node.typarams, itfDecl.rawTypeVariables());
        fillList(node.implementing, itfDecl.rawExtending(), FlagKey.TYPE_REFERENCE);
        NormalTypeBody body = new NormalTypeBody();
        fillList(node.defs, body.rawMembers(), flagKeyMap);
        itfDecl.astBody(body);
      } else if ((flags & Flags.ENUM) != 0) {
        EnumDeclaration enumDecl = new EnumDeclaration();
        typeDecl = enumDecl;
        EnumTypeBody body = new EnumTypeBody();
        fillList(node.implementing, enumDecl.rawImplementing(), FlagKey.TYPE_REFERENCE);
View Full Code Here

Examples of lombok.ast.Switch.astBody()

      Switch s = new Switch();
      JCExpression cond = node.getExpression();
      setConversionPositionInfo(s, "()", getPosition(cond));
      s.rawCondition(toTree(removeParens(cond)));
      Block b = new Block();
      s.astBody(b);
      for (JCCase c : node.getCases()) {
        JCExpression rawExpr = c.getExpression();
        if (rawExpr == null) b.rawContents().addToEnd(setPos(c, new Default()));
        else b.rawContents().addToEnd(setPos(c, new Case().rawCondition(toTree(rawExpr))));
        fillList(c.getStatements(), b.rawContents());
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.