@Beta public interface NewCpdTokens
Modifier and Type | Method and Description |
---|---|
NewCpdTokens |
addToken(TextRange range,
String image)
Call this method to register a token in a range.
|
NewCpdTokens |
onFile(InputFile inputFile)
The tokenized file.
|
void |
save()
Call this method only once when your are done with defining tokens of the file.
|
NewCpdTokens onFile(InputFile inputFile)
NewCpdTokens addToken(TextRange range, String image)
range
- 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).void save()
Copyright © 2009–2016 SonarSource. All rights reserved.