1 | Enumeration e = selectorElements();↵ | | 1 | Enumeration e = selectorElements();↵
|
2 | while (e.hasMoreElements()) {↵ | | 2 | while (e.hasMoreElements()) {↵
|
3 | Object o = e.nextElement();↵ | | 3 | Object o = e.nextElement();↵
|
4 | if (o instanceof BaseSelector) {↵ | | 4 | if (o instanceof BaseSelector) {↵
|
5 | ((BaseSelector) o).validate();↵ | | 5 | ((BaseSelector) o).validate();↵
|
6 | }↵ | | 6 | }↵
|
7 | }↵ | | 7 | }↵
|
8 | }↵ | | 8 | }↵
|
|
|
| | | 9 | /**↵
|
| | | 10 | * Method that each selector will implement to create their selection↵
|
| | | 11 | * behaviour. This is what makes SelectorContainer abstract.↵
|
| | | 12 | *↵
|
| | | 13 | * @param basedir the base directory the scan is being done from↵
|
| | | 14 | * @param filename the name of the file to check↵
|
| | | 15 | * @param file a java.io.File object for the filename that the selector↵
|
| | | 16 | * can use↵
|
| | | 17 | * @return whether the file should be selected or not↵
|
| | | 18 | */↵
|
| | | 19 | public abstract boolean isSelected(File basedir, String filename,↵
|
| | | 20 | File file);↵
|
|
|
9 | /* Methods below all add specific selectors */↵ | | 21 | /* Methods below all add specific selectors */↵
|
|
10 | /**↵ | | 22 | /**↵
|
11 | * add a "Select" selector entry on the selector list↵ | | 23 | * add a "Select" selector entry on the selector list↵
|
12 | * @param selector the selector to add↵ | | 24 | * @param selector the selector to add↵
|
13 | */↵ | | 25 | */↵
|
14 | public void addSelector(SelectSelector selector) {↵ | | 26 | public void addSelector(SelectSelector selector) {↵
|
15 | appendSelector(selector);↵ | | 27 | appendSelector(selector);↵
|
16 | }↵ | | 28 | }↵
|
|
17 | /**↵ | | 29 | /**↵
|
18 | * add an "And" selector entry on the selector list↵ | | 30 | * add an "And" selector entry on the selector list↵
|
19 | * @param selector the selector to add↵ | | 31 | * @param selector the selector to add↵
|
20 | */↵ | | 32 | */↵
|
21 | public void addAnd(AndSelector selector) {↵ | | 33 | public void addAnd(AndSelector selector) {↵
|
22 | appendSelector(selector);↵ | | 34 | appendSelector(selector);↵
|
23 | }↵ | | 35 | }↵
|
|
24 | /**↵ | | 36 | /**↵
|
25 | * add an "Or" selector entry on the selector list↵ | | 37 | * add an "Or" selector entry on the selector list↵
|
26 | * @param selector the selector to add↵ | | 38 | * @param selector the selector to add↵
|
27 | */↵ | | 39 | */↵
|
28 | public void addOr(OrSelector selector) {↵ | | 40 | public void addOr(OrSelector selector) {↵
|
29 | appendSelector(selector);↵ | | 41 | appendSelector(selector);↵
|
30 | }↵ | | 42 | }↵
|
|
31 | /**↵ | | 43 | /**↵
|
32 | * add a "Not" selector entry on the selector list↵ | | 44 | * add a "Not" selector entry on the selector list↵
|
33 | * @param selector the selector to add↵ | | 45 | * @param selector the selector to add↵
|
34 | */↵ | | 46 | */↵
|
35 | public void addNot(NotSelector selector) {↵ | | 47 | public void addNot(NotSelector selector) {↵
|
36 | appendSelector(selector);↵ | | 48 | appendSelector(selector);↵
|
37 | }↵ | | 49 | }↵
|
|
38 | /**↵ | | 50 | /**↵
|
39 | * add a "None" selector entry on the selector list↵ | | 51 | * add a "None" selector entry on the selector list↵
|
40 | * @param selector the selector to add↵ | | 52 | * @param selector the selector to add↵
|
41 | */↵ | | 53 | */↵
|
42 | public void addNone(NoneSelector selector) {↵ | | 54 | public void addNone(NoneSelector selector) {↵
|
43 | appendSelector(selector);↵ | | 55 | appendSelector(selector);↵
|
44 | }↵ | | 56 | }↵
|
|
45 | /**↵ | | 57 | /**↵
|
46 | * add a majority selector entry on the selector list↵ | | 58 | * add a majority selector entry on the selector list↵
|
47 | * @param selector the selector to add↵ | | 59 | * @param selector the selector to add↵
|
48 | */↵ | | 60 | */↵
|
49 | public void addMajority(MajoritySelector selector) {↵ | | 61 | public void addMajority(MajoritySelector selector) {↵
|
50 | appendSelector(selector);↵ | | 62 | appendSelector(selector);↵
|
51 | }↵ | | 63 | }↵
|
|
52 | /**↵ | | 64 | /**↵
|
53 | * add a selector date entry on the selector list↵ | | 65 | * add a selector date entry on the selector list↵
|
54 | * @param selector the selector to add↵ | | 66 | * @param selector the selector to add↵
|
55 | */↵ | | 67 | */↵
|
56 | public void addDate(DateSelector selector) {↵ | | 68 | public void addDate(DateSelector selector) {↵
|
57 | appendSelector(selector);↵ | | 69 | appendSelector(selector);↵
|
58 | }↵ | | 70 | }↵
|
|
59 | /**↵ | | 71 | /**↵
|
60 | * add a selector size entry on the selector list↵ | | 72 | * add a selector size entry on the selector list↵
|
61 | * @param selector the selector to add↵ | | 73 | * @param selector the selector to add↵
|
62 | */↵ | | 74 | */↵
|
63 | public void addSize(SizeSelector selector) {↵ | | 75 | public void addSize(SizeSelector selector) {↵
|
64 | appendSelector(selector);↵ | | 76 | appendSelector(selector);↵
|
65 | }↵ | | 77 | }↵
|
|
66 | /**↵ | | 78 | /**↵
|
67 | * add a selector filename entry on the selector list↵ | | 79 | * add a selector filename entry on the selector list↵
|
68 | * @param selector the selector to add↵ | | 80 | * @param selector the selector to add↵
|
69 | */↵ | | 81 | */↵
|
70 | public void addFilename(FilenameSelector selector) {↵ | | 82 | public void addFilename(FilenameSelector selector) {↵
|
71 | appendSelector(selector);↵ | | 83 | appendSelector(selector);↵
|
72 | }↵ | | 84 | }↵
|
|
73 | /**↵ | | 85 | /**↵
|
74 | * add an extended selector entry on the selector list↵ | | 86 | * add an extended selector entry on the selector list↵
|
75 | * @param selector the selector to add↵ | | 87 | * @param selector the selector to add↵
|
76 | */↵ | | 88 | */↵
|
77 | public void addCustom(ExtendSelector selector) {↵ | | 89 | public void addCustom(ExtendSelector selector) {↵
|
78 | appendSelector(selector);↵ | | 90 | appendSelector(selector);↵
|
79 | }↵ | | 91 | }↵
|
|
80 | /**↵ | | 92 | /**↵
|
81 | * add a contains selector entry on the selector list↵ | | 93 | * add a contains selector entry on the selector list↵
|
82 | * @param selector the selector to add↵ | | 94 | * @param selector the selector to add↵
|
83 | */↵ | | 95 | */↵
|
84 | public void addContains(ContainsSelector selector) {↵ | | 96 | public void addContains(ContainsSelector selector) {↵
|
85 | appendSelector(selector);↵ | | 97 | appendSelector(selector);↵
|
86 | }↵ | | 98 | }↵
|
|
87 | /**↵ | | 99 | /**↵
|
88 | * add a present selector entry on the selector list↵ | | 100 | * add a present selector entry on the selector list↵
|
89 | * @param selector the selector to add↵ | | 101 | * @param selector the selector to add↵
|
90 | */↵ | | 102 | */↵
|
91 | public void addPresent(PresentSelector selector) {↵ | | 103 | public void addPresent(PresentSelector selector) {↵
|
92 | appendSelector(selector);↵ | | 104 | appendSelector(selector);↵
|
93 | }↵ | | 105 | }↵
|
|
94 | /**↵ | | 106 | /**↵
|
95 | * add a depth selector entry on the selector list↵ | | 107 | * add a depth selector entry on the selector list↵
|
96 | * @param selector the selector to add↵ | | 108 | * @param selector the selector to add↵
|
97 | */↵ | | 109 | */↵
|
98 | public void addDepth(DepthSelector selector) {↵ | | 110 | public void addDepth(DepthSelector selector) {↵
|
99 | appendSelector(selector);↵ | | 111 | appendSelector(selector);↵
|
100 | }↵ | | 112 | }↵
|
|
101 | /**↵ | | 113 | /**↵
|
102 | * add a depends selector entry on the selector list↵ | | 114 | * add a depends selector entry on the selector list↵
|
103 | * @param selector the selector to add↵ | | 115 | * @param selector the selector to add↵
|
104 | */↵ | | 116 | */↵
|
105 | public void addDepend(DependSelector selector) {↵ | | 117 | public void addDepend(DependSelector selector) {↵
|
106 | appendSelector(selector);↵ | | 118 | appendSelector(selector);↵
|
107 | }↵ | | 119 | }↵
|
|
108 | /**↵ | | 120 | /**↵
|
109 | * adds a different selector to the selector list↵ | | 121 | * adds a different selector to the selector list↵
|
110 | * @param selector the selector to add↵ | | 122 | * @param selector the selector to add↵
|
111 | */↵ | | 123 | */↵
|
112 | public void addDifferent(DifferentSelector selector) {↵ | | 124 | public void addDifferent(DifferentSelector selector) {↵
|
113 | appendSelector(selector);↵ | | 125 | appendSelector(selector);↵
|
114 | }↵ | | 126 | }↵
|
|
115 | /**↵ | | 127 | /**↵
|
116 | * adds a type selector to the selector list↵ | | 128 | * adds a type selector to the selector list↵
|
117 | * @param selector the selector to add↵ | | 129 | * @param selector the selector to add↵
|
118 | */↵ | | 130 | */↵
|
119 | public void addType(TypeSelector selector) {↵ | | 131 | public void addType(TypeSelector selector) {↵
|
120 | appendSelector(selector);↵ | | 132 | appendSelector(selector);↵
|
121 | }↵ | | 133 | }↵
|
|
122 | /**↵ | | 134 | /**↵
|
123 | * add a regular expression selector entry on the selector list↵ | | 135 | * add a regular expression selector entry on the selector list↵
|
124 | * @param selector the selector to add↵ | | 136 | * @param selector the selector to add↵
|
125 | */↵ | | 137 | */↵
|
126 | public void addContainsRegexp(ContainsRegexpSelector selector) {↵ | | 138 | public void addContainsRegexp(ContainsRegexpSelector selector) {↵
|
127 | appendSelector(selector);↵ | | 139 | appendSelector(selector);↵
|
128 | }↵ | | 140 | }↵
|
|
129 | /**↵ | | 141 | /**↵
|
130 | * add the modified selector↵ | | 142 | * add the modified selector↵
|
131 | * @param selector the selector to add↵ | | 143 | * @param selector the selector to add↵
|
132 | * @since ant 1.6↵ | | 144 | * @since ant 1.6↵
|
133 | */↵ | | 145 | */↵
|
134 | public void addModified(ModifiedSelector selector) {↵ | | 146 | public void addModified(ModifiedSelector selector) {↵
|
135 | appendSelector(selector);↵ | | 147 | appendSelector(selector);↵
|
136 | }↵ | | 148 | }↵
|
|
137 | /**↵ | | 149 | /**↵
|
138 | * add an arbitary selector↵ | | 150 | * add an arbitary selector↵
|
139 | * @param selector the selector to add↵ | | 151 | * @param selector the selector to add↵
|
140 | * @since Ant 1.6↵ | | 152 | * @since Ant 1.6↵
|
141 | */↵ | | 153 | */↵
|
142 | public void add(FileSelector selector) {↵ | | 154 | public void add(FileSelector selector) {↵
|
143 | appendSelector(selector);↵ | | 155 | appendSelector(selector);↵
|
144 | | | 156 |
|