public class DuplicationsCollector extends Search.Collector
Search.Collector
, which constructs CloneGroup
s.Constructor and Description |
---|
DuplicationsCollector(TextSet text) |
Modifier and Type | Method and Description |
---|---|
void |
endOfGroup()
Constructs CloneGroup and saves it.
|
List<CloneGroup> |
getResult() |
void |
part(int start,
int end)
Constructs ClonePart and saves it for future processing in
endOfGroup() . |
void |
startOfGroup(int size,
int length)
Invoked at the beginning of processing for current node.
|
public DuplicationsCollector(TextSet text)
public List<CloneGroup> getResult()
public void startOfGroup(int size, int length)
Search.Collector
Length - is a depth of node. And nodes are visited in descending order of depth, thus we guaranty that length will not increase between two sequential calls of this method (can be equal or less than previous value).
size
- number of parts in grouplength
- length of each part in grouppublic void part(int start, int end)
endOfGroup()
.start
- number of first block from text for this partend
- number of last block from text for this partlen
- number of blocks in this partpublic void endOfGroup()
Copyright © 2009-2012 SonarSource. All Rights Reserved.