public class DefaultCpdTokens extends DefaultStorable implements NewCpdTokens
storage| Constructor and Description |
|---|
DefaultCpdTokens(Settings settings,
SensorStorage storage) |
| Modifier and Type | Method and Description |
|---|---|
NewCpdTokens |
addToken(int startLine,
int startLineOffset,
int endLine,
int endLineOffset,
String image)
Shortcut to avoid calling
InputFile.newRange(int, int, int, int) |
DefaultCpdTokens |
addToken(TextRange range,
String image)
Call this method to register a token in a range.
|
protected void |
doSave() |
List<TokensLine> |
getTokenLines() |
InputFile |
inputFile() |
DefaultCpdTokens |
onFile(InputFile inputFile)
The tokenized file.
|
save, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsavepublic DefaultCpdTokens(Settings settings, SensorStorage storage)
public DefaultCpdTokens onFile(InputFile inputFile)
NewCpdTokensonFile in interface NewCpdTokenspublic NewCpdTokens addToken(int startLine, int startLineOffset, int endLine, int endLineOffset, String image)
NewCpdTokensInputFile.newRange(int, int, int, int)addToken in interface NewCpdTokenspublic DefaultCpdTokens addToken(TextRange range, String image)
NewCpdTokensaddToken in interface NewCpdTokensrange - Token position. Use InputFile.newRange(int, int, int, int) to get a valid range.image - Text content of the token. Can be replaced by a constant placeholder for some tokens (like litterals).public List<TokensLine> getTokenLines()
protected void doSave()
doSave in class DefaultStorableCopyright © 2009–2017 SonarSource. All rights reserved.