1 | // |
2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-2 |
3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
5 | // Generated on: 2014.03.26 at 03:44:12 PM CET |
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 | * List of source files. |
25 | * |
26 | * <p>Java class for SourceFilesType complex type. |
27 | * |
28 | * <p>The following schema fragment specifies the expected content contained within this class. |
29 | * |
30 | * <pre> |
31 | * <complexType name="SourceFilesType"> |
32 | * <complexContent> |
33 | * <extension base="{http://jomc.org/tools/model}ToolsType"> |
34 | * <sequence> |
35 | * <element ref="{http://jomc.org/tools/model}source-file" maxOccurs="unbounded" minOccurs="0"/> |
36 | * </sequence> |
37 | * <attribute name="final" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> |
38 | * <attribute name="override" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" /> |
39 | * </extension> |
40 | * </complexContent> |
41 | * </complexType> |
42 | * </pre> |
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 = "2014-03-26T03:44:12+01: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 = "2014-03-26T03:44:12+01: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 = "2014-03-26T03:44:12+01: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 = "2014-03-26T03:44:12+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") |
64 | protected Boolean override; |
65 | |
66 | /** |
67 | * Creates a new {@code SourceFilesType} instance. |
68 | * |
69 | */ |
70 | public SourceFilesType() { |
71 | // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 |
72 | super(); |
73 | } |
74 | |
75 | /** |
76 | * Creates a new {@code SourceFilesType} instance by deeply copying a given {@code SourceFilesType} instance. |
77 | * |
78 | * |
79 | * @param o |
80 | * The instance to copy. |
81 | * @throws NullPointerException |
82 | * if {@code o} is {@code null}. |
83 | */ |
84 | public SourceFilesType(final SourceFilesType o) { |
85 | // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 |
86 | super(o); |
87 | if (o == null) { |
88 | throw new NullPointerException("Cannot create a copy of 'SourceFilesType' from 'null'."); |
89 | } |
90 | // 'SourceFile' collection. |
91 | if (o.sourceFile!= null) { |
92 | copySourceFile(o.getSourceFile(), this.getSourceFile()); |
93 | } |
94 | // CBuiltinLeafInfo: java.lang.Boolean |
95 | this._final = ((o._final == null)?null:o.isFinal()); |
96 | // CBuiltinLeafInfo: java.lang.Boolean |
97 | this.override = ((o.override == null)?null:o.isOverride()); |
98 | } |
99 | |
100 | /** |
101 | * Gets the value of the sourceFile property. |
102 | * |
103 | * <p> |
104 | * This accessor method returns a reference to the live list, |
105 | * not a snapshot. Therefore any modification you make to the |
106 | * returned list will be present inside the JAXB object. |
107 | * This is why there is not a <CODE>set</CODE> method for the sourceFile property. |
108 | * |
109 | * <p> |
110 | * For example, to add a new item, do as follows: |
111 | * <pre> |
112 | * getSourceFile().add(newItem); |
113 | * </pre> |
114 | * |
115 | * |
116 | * <p> |
117 | * Objects of the following type(s) are allowed in the list |
118 | * {@link SourceFileType } |
119 | * |
120 | * |
121 | */ |
122 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-03-26T03:44:12+01: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 | * Gets the value of the final property. |
132 | * |
133 | * @return |
134 | * possible object is |
135 | * {@link Boolean } |
136 | * |
137 | */ |
138 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-03-26T03:44:12+01: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 | * Sets the value of the final property. |
149 | * |
150 | * @param value |
151 | * allowed object is |
152 | * {@link Boolean } |
153 | * |
154 | */ |
155 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-03-26T03:44:12+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") |
156 | public void setFinal(Boolean value) { |
157 | this._final = value; |
158 | } |
159 | |
160 | /** |
161 | * Gets the value of the override property. |
162 | * |
163 | * @return |
164 | * possible object is |
165 | * {@link Boolean } |
166 | * |
167 | */ |
168 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-03-26T03:44:12+01: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 | * Sets the value of the override property. |
179 | * |
180 | * @param value |
181 | * allowed object is |
182 | * {@link Boolean } |
183 | * |
184 | */ |
185 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-03-26T03:44:12+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") |
186 | public void setOverride(Boolean value) { |
187 | this.override = value; |
188 | } |
189 | |
190 | /** |
191 | * Copies all values of property {@code SourceFile} deeply. |
192 | * |
193 | * @param source |
194 | * The source to copy from. |
195 | * @param target |
196 | * The target to copy {@code source} to. |
197 | * @throws NullPointerException |
198 | * if {@code target} is {@code null}. |
199 | */ |
200 | @SuppressWarnings("unchecked") |
201 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-03-26T03:44:12+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") |
202 | private static void copySourceFile(final List<SourceFileType> source, final List<SourceFileType> target) { |
203 | // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 |
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 | // CClassInfo: org.jomc.tools.model.SourceFileType |
209 | target.add(((SourceFileType) next).clone()); |
210 | continue; |
211 | } |
212 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
213 | throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'SourceFile' of class 'org.jomc.tools.model.SourceFilesType'.")); |
214 | } |
215 | } |
216 | } |
217 | |
218 | /** |
219 | * Creates and returns a deep copy of this object. |
220 | * |
221 | * |
222 | * @return |
223 | * A deep copy of this object. |
224 | */ |
225 | @Override |
226 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2014-03-26T03:44:12+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2") |
227 | public SourceFilesType clone() { |
228 | { |
229 | // CC-XJC Version 2.0.1 Build 2012-03-02T12:09:12+0000 |
230 | final SourceFilesType clone = ((SourceFilesType) super.clone()); |
231 | // 'SourceFile' collection. |
232 | if (this.sourceFile!= null) { |
233 | clone.sourceFile = null; |
234 | copySourceFile(this.getSourceFile(), clone.getSourceFile()); |
235 | } |
236 | // CBuiltinLeafInfo: java.lang.Boolean |
237 | clone._final = ((this._final == null)?null:this.isFinal()); |
238 | // CBuiltinLeafInfo: java.lang.Boolean |
239 | clone.override = ((this.override == null)?null:this.isOverride()); |
240 | return clone; |
241 | } |
242 | } |
243 | |
244 | /** |
245 | * Gets a source file model for a given name from the list of source file models. |
246 | * |
247 | * @param identifier The identifier of the source file model to return. |
248 | * |
249 | * @return The first matching source file model or {@code null}, if no such source file model is found. |
250 | * |
251 | * @throws NullPointerException if {@code identifier} is {@code null}. |
252 | * |
253 | * @see #getSourceFile() |
254 | * @see SourceFileType#getIdentifier() |
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 | } |