|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sonar.sslr.api.Comments
public class Comments
Utility class to manipulate comment tokens
| Constructor Summary | |
|---|---|
Comments(com.google.common.collect.ListMultimap<Integer,Token> comments)
|
|
Comments(com.google.common.collect.ListMultimap<Integer,Token> comments,
CommentAnalyser analyser)
|
|
| Method Summary | |
|---|---|
Token |
getCommentAtLine(int line)
Deprecated. see getCommentTokensAtLine(int) |
List<Token> |
getCommentTokensAtLine(int line)
|
SortedSet<Integer> |
getLinesOfComment()
Get the sorted list of lines containing at least a comment |
boolean |
hasCommentTokensAtLine(int line)
|
boolean |
isBlank(String commentValue)
|
boolean |
isBlankComment(int line)
Deprecated. see #isBlank(int) |
static boolean |
isBlankComment(String comment)
Deprecated. see isBlank(String) |
boolean |
isThereCommentAtLine(int commentLine)
Deprecated. see hasCommentTokensAtLine(int) |
boolean |
isThereCommentBeforeLine(int line)
Deprecated. since 1.13 use trivia instead |
Iterator<Token> |
iterator()
Iterates over the collection of comment tokens |
int |
size()
Return the number of comment tokens |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Comments(com.google.common.collect.ListMultimap<Integer,Token> comments)
public Comments(com.google.common.collect.ListMultimap<Integer,Token> comments,
CommentAnalyser analyser)
| Method Detail |
|---|
public Iterator<Token> iterator()
iterator in interface Iterable<Token>public SortedSet<Integer> getLinesOfComment()
public int size()
public boolean hasCommentTokensAtLine(int line)
line - the line where we expect to find some comment tokens
public List<Token> getCommentTokensAtLine(int line)
line - the line where we expect to find some comment tokens
public boolean isBlank(String commentValue)
commentValue - the value of the comment
@Deprecated public static boolean isBlankComment(String comment)
isBlank(String)
@Deprecated public boolean isBlankComment(int line)
#isBlank(int)
@Deprecated public Token getCommentAtLine(int line)
getCommentTokensAtLine(int)
public boolean isThereCommentBeforeLine(int line)
line - the line above which some non-blank comment tokens are expected to be found
@Deprecated public boolean isThereCommentAtLine(int commentLine)
hasCommentTokensAtLine(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||