1
2
3
4
5
6
7
8
9 package org.jomc.tools.model;
10
11 import java.util.ArrayList;
12 import java.util.Iterator;
13 import java.util.List;
14 import javax.annotation.Generated;
15 import javax.xml.bind.annotation.XmlAccessType;
16 import javax.xml.bind.annotation.XmlAccessorType;
17 import javax.xml.bind.annotation.XmlAttribute;
18 import javax.xml.bind.annotation.XmlElement;
19 import javax.xml.bind.annotation.XmlType;
20 import org.jomc.model.Inheritable;
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 @XmlAccessorType(XmlAccessType.FIELD)
47 @XmlType(name = "SourceFilesType", namespace = "http://jomc.org/tools/model", propOrder = {
48 "sourceFile"
49 })
50 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
51 public class SourceFilesType
52 extends ToolsType
53 implements Cloneable, Inheritable
54 {
55
56 @XmlElement(name = "source-file", namespace = "http://jomc.org/tools/model")
57 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
58 protected List<SourceFileType> sourceFile;
59 @XmlAttribute(name = "final")
60 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
61 protected Boolean _final;
62 @XmlAttribute(name = "override")
63 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
64 protected Boolean override;
65
66
67
68
69
70 public SourceFilesType() {
71
72 super();
73 }
74
75
76
77
78
79
80
81
82
83
84 public SourceFilesType(final SourceFilesType o) {
85
86 super(o);
87 if (o == null) {
88 throw new NullPointerException("Cannot create a copy of 'SourceFilesType' from 'null'.");
89 }
90
91 if (o.sourceFile!= null) {
92 copySourceFile(o.getSourceFile(), this.getSourceFile());
93 }
94
95 this._final = ((o._final == null)?null:o.isFinal());
96
97 this.override = ((o.override == null)?null:o.isOverride());
98 }
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
123 public List<SourceFileType> getSourceFile() {
124 if (sourceFile == null) {
125 sourceFile = new ArrayList<SourceFileType>();
126 }
127 return this.sourceFile;
128 }
129
130
131
132
133
134
135
136
137
138 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
139 public boolean isFinal() {
140 if (_final == null) {
141 return false;
142 } else {
143 return _final;
144 }
145 }
146
147
148
149
150
151
152
153
154
155 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
156 public void setFinal(Boolean value) {
157 this._final = value;
158 }
159
160
161
162
163
164
165
166
167
168 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
169 public boolean isOverride() {
170 if (override == null) {
171 return false;
172 } else {
173 return override;
174 }
175 }
176
177
178
179
180
181
182
183
184
185 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
186 public void setOverride(Boolean value) {
187 this.override = value;
188 }
189
190
191
192
193
194
195
196
197
198
199
200 @SuppressWarnings("unchecked")
201 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
202 private static void copySourceFile(final List<SourceFileType> source, final List<SourceFileType> target) {
203
204 if ((source!= null)&&(!source.isEmpty())) {
205 for (final Iterator<?> it = source.iterator(); it.hasNext(); ) {
206 final Object next = it.next();
207 if (next instanceof SourceFileType) {
208
209 target.add(((SourceFileType) next).clone());
210 continue;
211 }
212
213 throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'SourceFile' of class 'org.jomc.tools.model.SourceFilesType'."));
214 }
215 }
216 }
217
218
219
220
221
222
223
224
225 @Override
226 @Generated(value = "com.sun.tools.xjc.Driver", date = "2012-06-03T09:56:13+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
227 public SourceFilesType clone() {
228 {
229
230 final SourceFilesType clone = ((SourceFilesType) super.clone());
231
232 if (this.sourceFile!= null) {
233 clone.sourceFile = null;
234 copySourceFile(this.getSourceFile(), clone.getSourceFile());
235 }
236
237 clone._final = ((this._final == null)?null:this.isFinal());
238
239 clone.override = ((this.override == null)?null:this.isOverride());
240 return clone;
241 }
242 }
243
244
245
246
247
248
249
250
251
252
253
254
255
256 public SourceFileType getSourceFile( final String identifier )
257 {
258 if ( identifier == null )
259 {
260 throw new NullPointerException( "identifier" );
261 }
262
263 for ( int i = 0, s0 = this.getSourceFile().size(); i < s0; i++ )
264 {
265 final SourceFileType s = this.getSourceFile().get( i );
266
267 if ( identifier.equals( s.getIdentifier() ) )
268 {
269 return s;
270 }
271 }
272
273 return null;
274 }
275
276 }