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

COVERAGE SUMMARY FOR SOURCE FILE [CapacityLimitException.java]

nameclass, %method, %block, %line, %
CapacityLimitException.java100% (1/1)33%  (2/6)13%  (9/70)15%  (1.8/12)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CapacityLimitException100% (1/1)33%  (2/6)13%  (9/70)15%  (1.8/12)
CapacityLimitException (BigInteger): void 0%   (0/1)0%   (0/6)0%   (0/3)
getCapacityLimitMessage (Locale, Number): String 0%   (0/1)0%   (0/26)0%   (0/3)
getLocale (): Locale 0%   (0/1)0%   (0/20)0%   (0/3)
getMessage (): String 0%   (0/1)0%   (0/7)0%   (0/1)
<static initializer> 100% (1/1)75%  (6/8)75%  (0.8/1)
getCapacityLimit (): BigInteger 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: CapacityLimitException.java 2244 2010-06-29 07:58:09Z schulte2005 $
33 *
34 */
35// </editor-fold>
36// SECTION-END
37package org.jomc.sequences;
38 
39import java.math.BigInteger;
40 
41// SECTION-START[Documentation]
42// <editor-fold defaultstate="collapsed" desc=" Generated Documentation ">
43/**
44 * Gets thrown whenever the directories capacity limit has been reached.
45 * <p><b>Dependencies</b><ul>
46 * <li>"{@link #getLocale Locale}"<blockquote>
47 * Dependency on {@code 'java.util.Locale'} {@code (java.util.Locale)} at specification level 1.1 bound to an instance.</blockquote></li>
48 * </ul></p>
49 * <p><b>Messages</b><ul>
50 * <li>"{@link #getCapacityLimitMessage capacityLimitMessage}"<table>
51 * <tr><td valign="top">English:</td><td valign="top"><pre>The capacity limit {0,number} of the sequence directory has been reached.</pre></td></tr>
52 * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Kapazit&auml;tsgrenze {0,number} des Sequenz-Verzeichnisses erreicht.</pre></td></tr>
53 * </table>
54 * </ul></p>
55 *
56 * @author <a href="mailto:schulte2005@users.sourceforge.net">Christian Schulte</a> 1.0
57 * @version $Id: CapacityLimitException.java 2244 2010-06-29 07:58:09Z schulte2005 $
58 */
59// </editor-fold>
60// SECTION-END
61// SECTION-START[Annotations]
62// <editor-fold defaultstate="collapsed" desc=" Generated Annotations ">
63@javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.0", comments = "See http://jomc.sourceforge.net/jomc/1.0/jomc-tools" )
64// </editor-fold>
65// SECTION-END
66public class CapacityLimitException extends SequencesException
67{
68    // SECTION-START[CapacityLimitException]
69 
70    /** Serial version UID for backwards compatibility with 1.0.x classes. */
71    private static final long serialVersionUID = 5107026746069981206L;
72 
73    /**
74     * Capacity limit value.
75     * @serial
76     */
77    private final BigInteger capacityLimit;
78 
79    /**
80     * Creates a new {@code CapacityLimitException} taking the capacity limit value.
81     *
82     * @param capacityLimit The capacity limit to report.
83     */
84    public CapacityLimitException( final BigInteger capacityLimit )
85    {
86        super();
87        this.capacityLimit = capacityLimit;
88    }
89 
90    /**
91     * Gets the reported capacity limit.
92     *
93     * @return The reported capacity limit.
94     */
95    public BigInteger getCapacityLimit()
96    {
97        return this.capacityLimit;
98    }
99 
100    /**
101     * Gets the message of the exception.
102     *
103     * @return The message of the exception.
104     */
105    @Override
106    public String getMessage()
107    {
108        return this.getCapacityLimitMessage( this.getLocale(), this.getCapacityLimit() );
109    }
110 
111    // SECTION-END
112    // SECTION-START[Dependencies]
113    // <editor-fold defaultstate="collapsed" desc=" Generated Dependencies ">
114 
115    /**
116     * Gets the {@code Locale} dependency.
117     * <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>
118     * <p>That specification does not apply to any scope. A new object is returned whenever requested and bound to this instance.</p>
119     * @return The {@code Locale} dependency.
120     * @throws org.jomc.ObjectManagementException if getting the dependency instance fails.
121     */
122    @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.0", comments = "See http://jomc.sourceforge.net/jomc/1.0/jomc-tools" )
123    private java.util.Locale getLocale()
124    {
125        final java.util.Locale _d = (java.util.Locale) org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getDependency( this, "Locale" );
126        assert _d != null : "'Locale' dependency not found.";
127        return _d;
128    }
129    // </editor-fold>
130    // SECTION-END
131    // SECTION-START[Properties]
132    // SECTION-END
133    // SECTION-START[Messages]
134    // <editor-fold defaultstate="collapsed" desc=" Generated Messages ">
135 
136    /**
137     * Gets the text of the {@code capacityLimitMessage} message.
138     * <p><b>Templates</b><br/><table>
139     * <tr><td valign="top">English:</td><td valign="top"><pre>The capacity limit {0,number} of the sequence directory has been reached.</pre></td></tr>
140     * <tr><td valign="top">Deutsch:</td><td valign="top"><pre>Kapazit&auml;tsgrenze {0,number} des Sequenz-Verzeichnisses erreicht.</pre></td></tr>
141     * </table></p>
142     * @param locale The locale of the message to return.
143     * @param limit Format argument.
144     * @return The text of the {@code capacityLimitMessage} message.
145     *
146     * @throws org.jomc.ObjectManagementException if getting the message instance fails.
147     */
148    @javax.annotation.Generated( value = "org.jomc.tools.SourceFileProcessor 1.0", comments = "See http://jomc.sourceforge.net/jomc/1.0/jomc-tools" )
149    private String getCapacityLimitMessage( final java.util.Locale locale, final java.lang.Number limit )
150    {
151        final String _m = org.jomc.ObjectManagerFactory.getObjectManager( this.getClass().getClassLoader() ).getMessage( this, "capacityLimitMessage", locale, limit );
152        assert _m != null : "'capacityLimitMessage' message not found.";
153        return _m;
154    }
155    // </editor-fold>
156    // SECTION-END
157}

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