Package lombok.ast

Examples of lombok.ast.Comment


  }
 
  public boolean logBlockComment(String text) {
    if (text.startsWith("/*")) text = text.substring(2);
    if (text.endsWith("*/")) text = text.substring(0, text.length() - 2);
    Comment c = new Comment().astBlockComment(true).astContent(text);
    c.setPosition(new Position(startPos(), currentPos()));
    source.registerComment(getContext(), c);
    return true;
  }
View Full Code Here


    return true;
  }
 
  public boolean logLineComment(String text) {
    if (text.startsWith("//")) text = text.substring(2);
    Comment c = new Comment().astBlockComment(false).astContent(text);
    c.setPosition(new Position(startPos(), currentPos()));
    source.registerComment(getContext(), c);
    return true;
  }
View Full Code Here

    }
  }
 
  private void addJavadoc(JavadocContainer container, JCModifiers mods) {
    if ((mods.flags & Flags.DEPRECATED) != 0) {
      container.astJavadoc(new Comment().astBlockComment(true).astContent("*\n * @deprecated\n "));
    }
  }
View Full Code Here

 
  private void attachJavadocToNode(CommentInfo javadoc, JavadocContainer node) {
    String content = javadoc.content;
    if (content.startsWith("/*") && content.endsWith("*/")) content = content.substring(2, content.length() - 2);
   
    Comment comment = new Comment().astBlockComment(true).astContent(content);
    comment.setPosition(new Position(javadoc.pos, javadoc.endPos));
    node.astJavadoc(comment);
    if (!node.getPosition().isUnplaced()) {
      int oldStart = node.getPosition().getStart();
      if (oldStart == -1 || comment.getPosition().getStart() < oldStart) {
        node.setPosition(new Position(comment.getPosition().getStart(), node.getPosition().getEnd()));
      }
    }
  }
View Full Code Here

TOP

Related Classes of lombok.ast.Comment

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.