|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DuplicationTokenBuilder
This builder is used to define token on files. Tokens are later used to compute duplication.
Tokens should be declared in sequential order.
Example:
DuplicationTokenBuilder tokenBuilder = context.duplicationTokenBuilder(inputFile)
.addToken(1, "public")
.addToken(1, "class")
.addToken(1, "Foo")
.addToken(1, "{")
.addToken(2, "}")
.done();
| Method Summary | |
|---|---|
DuplicationTokenBuilder |
addToken(int line,
String image)
Call this method to register a new token. |
void |
done()
Call this method only once when your are done with defining tokens of the file. |
| Method Detail |
|---|
DuplicationTokenBuilder addToken(int line,
String image)
line - Line number of the token. Line starts at 1.image - Text of the token.void done()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||