|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DuplicationBuilder
This builder is used to declare duplications on files of the project.
Usage:
DuplicationBuilder builder = context.duplicationBuilder(inputFile);
.originBlock(2, 10)
.isDuplicatedBy(inputFile, 14, 22)
.isDuplicatedBy(anotherInputFile, 3, 11)
// Start another duplication
.originBlock(45, 50)
.isDuplicatedBy(yetAnotherInputFile, 10, 15);
context.saveDuplications(inputFile, builder.build());
Method Summary | |
---|---|
List<DuplicationGroup> |
build()
Call this method when you have declared all duplications of the file. |
DuplicationBuilder |
isDuplicatedBy(InputFile sameOrOtherFile,
int startLine,
int endLine)
Declare duplicate block of the previously declared originBlock(int, int) . |
DuplicationBuilder |
originBlock(int startLine,
int endLine)
Declare duplication origin block. |
Method Detail |
---|
DuplicationBuilder originBlock(int startLine, int endLine)
isDuplicatedBy(InputFile, int, int)
to reference all duplicates of this block.
Then call again originBlock(int, int)
to declare another duplication.
DuplicationBuilder isDuplicatedBy(InputFile sameOrOtherFile, int startLine, int endLine)
originBlock(int, int)
.
sameOrOtherFile
- duplicate can be in the same file or in another file.List<DuplicationGroup> build()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |