EMMA Coverage Report (generated Thu Jan 03 04:54:40 CET 2013)
[all classes][org.jomc.tools.model]

COVERAGE SUMMARY FOR SOURCE FILE [SourceFilesType.java]

nameclass, %method, %block, %line, %
SourceFilesType.java100% (1/1)70%  (7/10)57%  (108/188)63%  (28.5/45)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SourceFilesType100% (1/1)70%  (7/10)57%  (108/188)63%  (28.5/45)
SourceFilesType (SourceFilesType): void 0%   (0/1)0%   (0/39)0%   (0/8)
setFinal (Boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)
setOverride (Boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)
isFinal (): boolean 100% (1/1)56%  (5/9)67%  (2/3)
isOverride (): boolean 100% (1/1)56%  (5/9)67%  (2/3)
copySourceFile (List, List): void 100% (1/1)64%  (25/39)88%  (7/8)
clone (): SourceFilesType 100% (1/1)84%  (31/37)93%  (6.5/7)
getSourceFile (String): SourceFileType 100% (1/1)85%  (28/33)86%  (6/7)
SourceFilesType (): void 100% (1/1)100% (3/3)100% (2/2)
getSourceFile (): List 100% (1/1)100% (11/11)100% (3/3)

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: 2013.01.03 at 05:11:05 AM CET 
6//
7 
8 
9package org.jomc.tools.model;
10 
11import java.util.ArrayList;
12import java.util.Iterator;
13import java.util.List;
14import javax.annotation.Generated;
15import javax.xml.bind.annotation.XmlAccessType;
16import javax.xml.bind.annotation.XmlAccessorType;
17import javax.xml.bind.annotation.XmlAttribute;
18import javax.xml.bind.annotation.XmlElement;
19import javax.xml.bind.annotation.XmlType;
20import 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 * &lt;complexType name="SourceFilesType">
32 *   &lt;complexContent>
33 *     &lt;extension base="{http://jomc.org/tools/model}ToolsType">
34 *       &lt;sequence>
35 *         &lt;element ref="{http://jomc.org/tools/model}source-file" maxOccurs="unbounded" minOccurs="0"/>
36 *       &lt;/sequence>
37 *       &lt;attribute name="final" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
38 *       &lt;attribute name="override" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
39 *     &lt;/extension>
40 *   &lt;/complexContent>
41 * &lt;/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 = "2013-01-03T05:11:05+01:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-2")
51public 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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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 = "2013-01-03T05:11:05+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}

[all classes][org.jomc.tools.model]
EMMA 2.1.5320 (stable) (C) Vladimir Roubtsov