/** * Creates and returns a new line comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented line comment node * @since 3.0 */ public LineComment newLineComment() { LineComment result = new LineComment(this); return result; }
/** * Creates and returns a new line comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented line comment node * @since 3.0 */ public LineComment newLineComment() { LineComment result = new LineComment(this); return result; }
/** * Creates and returns a new line comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented line comment node * @since 3.0 */ public LineComment newLineComment() { LineComment result = new LineComment(this); return result; }
/** * Creates and returns a new line comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented line comment node * @since 3.0 */ public LineComment newLineComment() { LineComment result = new LineComment(this); return result; }
/** * Creates and returns a new line comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented line comment node * @since 3.0 */ public LineComment newLineComment() { LineComment result = new LineComment(this); return result; }
/** * Creates and returns a new line comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented line comment node * @since 3.0 */ public LineComment newLineComment() { LineComment result = new LineComment(this); return result; }
ASTNode clone0(AST target) { LineComment result = new LineComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { LineComment result = new LineComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
@Override ASTNode clone0(AST target) { LineComment result = new LineComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { LineComment result = new LineComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { LineComment result = new LineComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { LineComment result = new LineComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }