]>
Commit | Line | Data |
---|---|---|
1b2798f6 EK |
1 | package no.uio.ifi.refaktor.analyze.collectors; |
2 | ||
3 | import no.uio.ifi.refaktor.prefix.Prefix; | |
4 | import no.uio.ifi.refaktor.prefix.PrefixSet; | |
5 | import no.uio.ifi.refaktor.textselection.CompilationUnitTextSelection; | |
6 | ||
7 | public class PrefixesCollector extends AbstractPrefixCollector { | |
8 | ||
9 | private final PrefixSet prefixes; | |
10 | ||
11 | public PrefixesCollector(CompilationUnitTextSelection selection) { | |
12 | super(selection); | |
13 | this.prefixes = new PrefixSet(); | |
14 | } | |
15 | ||
16 | protected void registerPrefix(Prefix prefix) { | |
17 | prefixes.registerAllSubPrefixesOf(prefix); | |
18 | } | |
19 | ||
20 | public PrefixSet getPrefixes() { | |
21 | return prefixes; | |
22 | } | |
23 | ||
24 | @Override | |
25 | public void clearData() { | |
26 | prefixes.clear(); | |
27 | } | |
28 | } |