Package lombok.ast

Examples of lombok.ast.PackageDeclaration


    ImportList il = new ImportList();
   
    while (n != null) {
      if (n instanceof CompilationUnit) {
        CompilationUnit cu = (CompilationUnit) n;
        PackageDeclaration pkg = cu.astPackageDeclaration();
        if (pkg != null) il.stars.add(pkg.getPackageName());
        for (ImportDeclaration imp : cu.astImportDeclarations()) {
          if (imp.astStaticImport()) continue;
          if (imp.astStarImport()) {
            String i = imp.asFullyQualifiedName();
            i = i.substring(0, i.length() - 2);
View Full Code Here


    decl.rawReturnTypeReference(returnType);
    return posify(decl);
  }
 
  public Node createPackageDeclaration(List<Node> annotations, Node head, List<Node> tail) {
    PackageDeclaration decl = new PackageDeclaration();
    if (annotations != null) for (Node n : annotations) if (n != null) decl.rawAnnotations().addToEnd(n);
    if (head != null) decl.rawParts().addToEnd(head);
    if (tail != null) for (Node n : tail) if (n != null) decl.rawParts().addToEnd(n);
    return posify(decl);
  }
View Full Code Here

    }
   
    @Override public void visitTopLevel(JCCompilationUnit node) {
      CompilationUnit unit = new CompilationUnit();
      if (node.pid != null) {
        PackageDeclaration pkg = new PackageDeclaration();
        fillWithIdentifiers(node.pid, pkg.astParts());
        unit.astPackageDeclaration(setPos(node.pid, pkg));
        fillList(node.packageAnnotations, pkg.rawAnnotations());
      }
     
      for (JCTree def : node.defs) {
        if (def instanceof JCImport) {
          unit.rawImportDeclarations().addToEnd(toTree(def));
View Full Code Here

TOP

Related Classes of lombok.ast.PackageDeclaration

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.