EMMA Coverage Report (generated Tue Jun 29 21:21:09 CEST 2010)
[all classes][org.jomc.sequences]

COVERAGE SUMMARY FOR SOURCE FILE [SequenceVetoException.java]

nameclass, %method, %block, %line, %
SequenceVetoException.java100% (1/1)29%  (2/7)13%  (9/70)12%  (1.8/15)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SequenceVetoException100% (1/1)29%  (2/7)13%  (9/70)12%  (1.8/15)
SequenceVetoException (): void 0%   (0/1)0%   (0/6)0%   (0/3)
SequenceVetoException (SequenceChangeEvent): void 0%   (0/1)0%   (0/6)0%   (0/3)
getIllegalSequenceMessage (Locale): String 0%   (0/1)0%   (0/22)0%   (0/3)
getLocale (): Locale 0%   (0/1)0%   (0/20)0%   (0/3)
getMessage (): String 0%   (0/1)0%   (0/5)0%   (0/1)
<static initializer> 100% (1/1)75%  (6/8)75%  (0.8/1)
getSequenceChangeEvent (): SequenceChangeEvent 100% (1/1)100% (3/3)100% (1/1)

1// SECTION-START[License Header]
2// <editor-fold defaultstate="collapsed" desc=" Generated License ">
3/*
4 *   Copyright (c) 2010 The JOMC Project
5 *   Copyright (c) 2005 Christian Schulte <schulte2005@users.sourceforge.net>
6 *   All rights reserved.
7 *
8 *   Redistribution and use in source and binary forms, with or without
9 *   modification, are permitted provided that the following conditions
10 *   are met:
11 *
12 *     o Redistributions of source code must retain the above copyright
13 *       notice, this list of conditions and the following disclaimer.
14 *
15 *     o Redistributions in binary form must reproduce the above copyright
16 *       notice, this list of conditions and the following disclaimer in
17 *       the documentation and/or other materials provided with the
18 *       distribution.
19 *
20 *   THIS SOFTWARE IS PROVIDED BY THE JOMC PROJECT AND CONTRIBUTORS "AS IS"
21 *   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 *   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 *   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE JOMC PROJECT OR
24 *   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 *   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 *   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 *   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 *   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 *   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 *   ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 *   $Id: SequenceVetoException.java 2244 2010-06-29 07:58:09Z schulte2005 $
33 *
34 */
35// </editor-fold>
36// SECTION-END
37package org.jomc.sequences;
38 
39// SECTION-START[Documentation]
40// <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
41/**
42 * Gets thrown whenever illegal sequence information is passed to a method expecting legal sequence data.
43 * <p><b>Dependencies</b><ul>
44 * <li>"{@link #getLocale Locale}"<blockquote>
45 * Dependency on {@code 'java.util.Locale'} {@code (java.util.Locale)} at specification level 1.1 bound to an instance.</blockquote></li>
46 * </ul></p>
47 * <p><b>Messages</b><ul>
48 * <li>"{@link #getIllegalSequenceMessage illegalSequenceMessage}"<table>
49 * <tr><td valign="top">English:</td><td valign="top"><pre>Illegal sequence data.</pre></td></tr>
50 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ung&uuml;ltige Sequenzdaten.</pre></td></tr>
51 * </table>
52 * </ul></p>
53 *
54 * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0
55 * @version $Id: SequenceVetoException.java 2244 2010-06-29 07:58:09Z schulte2005 $
56 */
57// </editor-fold>
58// SECTION-END
59// SECTION-START[Annotations]
60// <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
61@javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.0", comments = "See http://jomc.sourceforge.net/jomc/1.0/jomc-tools" )
62// </editor-fold>
63// SECTION-END
64public class SequenceVetoException extends SequencesException
65{
66    // SECTION-START[SequenceVetoException]
67 
68    /** Serial version UID for backwards compatibility with 1.0.x classes. */
69    private static final long serialVersionUID = 5024149161696766768L;
70 
71    /**
72     * Event describing a vetoed sequence change.
73     * @serial
74     */
75    private final SequenceChangeEvent sequenceChangeEvent;
76 
77    /**
78     * Creates a new {@code SequenceVetoException} taking an event describing a vetoed sequence change.
79     *
80     * @param evt An event describing a vetoed sequence change.
81     */
82    public SequenceVetoException( final SequenceChangeEvent evt )
83    {
84        super();
85        this.sequenceChangeEvent = evt;
86    }
87 
88    /**
89     * Gets the event describing the vetoed change.
90     *
91     * @return The event describing the vetoed change.
92     */
93    public SequenceChangeEvent getSequenceChangeEvent()
94    {
95        return this.sequenceChangeEvent;
96    }
97 
98    /**
99     * Gets the message of the exception.
100     *
101     * @return The message of the exception.
102     */
103    @Override
104    public String getMessage()
105    {
106        return this.getIllegalSequenceMessage( this.getLocale() );
107    }
108 
109    // SECTION-END
110    // SECTION-START[Constructors]
111    // <editor-fold defaultstate="collapsed" desc=" Generated Constructors ">
112 
113    /** Creates a new {@code SequenceVetoException} instance. */
114    @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.0", comments = "See http://jomc.sourceforge.net/jomc/1.0/jomc-tools" )
115    public SequenceVetoException()
116    {
117        // SECTION-START[Default Constructor]
118        super();
119        this.sequenceChangeEvent = null;
120        // SECTION-END
121    }
122    // </editor-fold>
123    // SECTION-END
124    // SECTION-START[Dependencies]
125    // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies ">
126 
127    /**
128     * Gets the {@code Locale} dependency.
129     * <p>This method returns the {@code 'default'} object of the {@code 'java.util.Locale'} {@code (java.util.Locale)} specification at specification level 1.1.</p>
130     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
131     * @return The {@code Locale} dependency.
132     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
133     */
134    @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.0", comments = "See http://jomc.sourceforge.net/jomc/1.0/jomc-tools" )
135    private java.util.Locale getLocale()
136    {
137        final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
138        assert _d != null : "'Locale' dependency not found.";
139        return _d;
140    }
141    // </editor-fold>
142    // SECTION-END
143    // SECTION-START[Properties]
144    // SECTION-END
145    // SECTION-START[Messages]
146    // <editor-fold defaultstate="collapsed" desc=" Generated Messages ">
147 
148    /**
149     * Gets the text of the {@code illegalSequenceMessage} message.
150     * <p><b>Templates</b><br/><table>
151     * <tr><td valign="top">English:</td><td valign="top"><pre>Illegal sequence data.</pre></td></tr>
152     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Ung&uuml;ltige Sequenzdaten.</pre></td></tr>
153     * </table></p>
154     * @param locale The locale of the message to return.
155     * @return The text of the {@code illegalSequenceMessage} message.
156     *
157     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
158     */
159    @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.0", comments = "See http://jomc.sourceforge.net/jomc/1.0/jomc-tools" )
160    private String getIllegalSequenceMessage( final java.util.Locale locale )
161    {
162        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "illegalSequenceMessage", locale );
163        assert _m != null : "'illegalSequenceMessage' message not found.";
164        return _m;
165    }
166    // </editor-fold>
167    // SECTION-END
168}

[all classes][org.jomc.sequences]
EMMA 2.0.5312 (C) Vladimir Roubtsov