com.puppycrawl.tools.checkstyle.api
Interface TextBlock
public interface TextBlock
A block of text from an inputfile that does not necessarily
have any grammatical structure.
int | getEndColNo()- The column in the inputfile where the text block ends.
|
int | getEndLineNo()- The last line of the text block in the inputfile.
|
int | getStartColNo()- The column in the inputfile where the text block starts.
|
int | getStartLineNo()- The line in the inputfile where the text block starts.
|
String[] | getText()- The text content of the text block.
|
boolean | intersects(int aStartLineNo, int aStartColNo, int aEndLineNo, int aEndColNo)- Checks if this comment intersects with a specified
part of the file.
|
getEndColNo
public int getEndColNo()
The column in the inputfile where the text block ends.
Counting starts from 0.
- last line of the text block
getEndLineNo
public int getEndLineNo()
The last line of the text block in the inputfile.
Counting starts from 1.
- last line of the text block
getStartColNo
public int getStartColNo()
The column in the inputfile where the text block starts.
Counting starts from 0.
- first line of the text block
getStartLineNo
public int getStartLineNo()
The line in the inputfile where the text block starts.
Counting starts from 1.
- first line of the text block
getText
public String[] getText()
The text content of the text block.
Each line is represented by one array entry.
The linebreak characters are not part of the text content.
- the text content of the text block.
intersects
public boolean intersects(int aStartLineNo,
int aStartColNo,
int aEndLineNo,
int aEndColNo) Checks if this comment intersects with a specified
part of the file.
aStartLineNo - the starting line number in the fileaStartColNo - the starting column number in the fileaEndLineNo - the ending line number in the fileaEndColNo - the ending column number in the file
- true if the positions intersects with this comment.