Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Author:
  lkuehne

Method Summary
`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.
`java.lang.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.

Method Detail

### getText

    public java.lang.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.

  Returns:
    the text content of the text block.

### getStartLineNo

    public int getStartLineNo()

  The line in the inputfile where the text block starts. Counting starts from 1.

  Returns:
    first line of the text block

### getEndLineNo

    public int getEndLineNo()

  The last line of the text block in the inputfile. Counting starts from 1.

  Returns:
    last line of the text block

### getStartColNo

    public int getStartColNo()

  The column in the inputfile where the text block starts. Counting starts from 0.

  Returns:
    first line of the text block

### getEndColNo

    public int getEndColNo()

  The column in the inputfile where the text block ends. Counting starts from 0.

  Returns:
    last line 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.

  Parameters:
    `aStartLineNo` - the starting line number in the file
    `aStartColNo` - the starting column number in the file
    `aEndLineNo` - the ending line number in the file
    `aEndColNo` - the ending column number in the file
  Returns:
    true if the positions intersects with this comment.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Back to the Checkstyle Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD