EMMA Coverage Report (generated Fri Jun 19 09:16:10 CEST 2009)
[all classes][org.ktc.rbutils]

COVERAGE SUMMARY FOR SOURCE FILE [RbUtilsHelper.java]

nameclass, %method, %block, %line, %
RbUtilsHelper.java100% (1/1)78%  (7/9)79%  (44/56)69%  (6,9/10)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class RbUtilsHelper100% (1/1)78%  (7/9)79%  (44/56)69%  (6,9/10)
RbUtilsHelper (): void 0%   (0/1)0%   (0/6)0%   (0/2)
getMessage (String, Object []): String 0%   (0/1)0%   (0/5)0%   (0/1)
<static initializer> 100% (1/1)91%  (10/11)90%  (0,9/1)
getFullVersion (): String 100% (1/1)100% (13/13)100% (1/1)
getHomePage (): String 100% (1/1)100% (3/3)100% (1/1)
getLocalizedMessage (String, Object []): Message 100% (1/1)100% (7/7)100% (1/1)
getMessage (String): String 100% (1/1)100% (5/5)100% (1/1)
getTimestamp (): String 100% (1/1)100% (3/3)100% (1/1)
getVersion (): String 100% (1/1)100% (3/3)100% (1/1)

1/*
2 * Copyright  2005-2006 The RbUtils Project
3 *
4 *  Licensed under the Apache License, Version 2.0 (the "License");
5 *  you may not use this file except in compliance with the License.
6 *  You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 *  Unless required by applicable law or agreed to in writing, software
11 *  distributed under the License is distributed on an "AS IS" BASIS,
12 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 *  See the License for the specific language governing permissions and
14 *  limitations under the License.
15 *
16 */
17 
18// $Id: RbUtilsHelper.java,v 1.3 2006/09/16 14:29:10 redfish Exp $
19 
20package org.ktc.rbutils;
21 
22 
23import org.ktc.rbutils.api.i18n.Message;
24 
25/**
26 * Provides general informations about the RbUtils project.
27 * @since RbUtils 0.4.1
28 * @version $Revision: 1.3 $
29 * @author ktcguru
30 */
31public class RbUtilsHelper {
32 
33    /** Name of the RessourceBundle for this class. */
34    private static final String RESOURCE = rbutilsInfos.class.getName();
35 
36    /**
37     * Dummy constructor. This <b>MUST NOT</b> be instanciated.
38     * @throws UnsupportedOperationException if this class is instanciated.
39     */
40    protected RbUtilsHelper() {
41        // prevents calls from subclass
42        throw new UnsupportedOperationException();
43    }
44 
45    /**
46     * Returns the version of the project.
47     * @return the version of project.
48     */
49    public static String getVersion() {
50        return getMessage(rbutilsInfos.RBUTILS_VERSION);
51    }
52 
53    /**
54     * Returns the compiled timestamp of the project.
55     * @return the compiled timestamp of the project.
56     * @since RbUtils 0.9.3.3
57     */
58    public static String getTimestamp() {
59        return getMessage(rbutilsInfos.RBUTILS_TIMESTAMP);
60    }
61 
62    /**
63     * Returns the project's homepage url.
64     * @return the project's homepage url.
65     */
66    public static String getHomePage() {
67        return getMessage(rbutilsInfos.RBUTILS_HOMEPAGE);
68    }
69 
70    /**
71     * {@inheritDoc}
72     */
73    public static Message getLocalizedMessage(final String key, final Object[] args) {
74        // TODO code - duplication with the localized message feature
75        return new Message(RESOURCE, key, args);
76    }
77 
78    /**
79     * {@inheritDoc}
80     */
81    public static String getMessage(final String key, final Object[] args) {
82        return getLocalizedMessage(key, args).getMessage();
83    }
84 
85    /**
86     * {@inheritDoc}
87     */
88    public static String getMessage(final String key) {
89        return getLocalizedMessage(key, null).getMessage();
90    }
91 
92    /**
93     * Returns the full version of RbUtils. It means the version number and the compiled timestamp.
94     * @return the full version of RbUtils.
95     * @since RbUtils 0.9.3.3
96     */
97    public static String getFullVersion() {
98        return getVersion() + " (" + getTimestamp() + ")";
99    }
100 
101}

[all classes][org.ktc.rbutils]
EMMA 2.0.5312 (C) Vladimir Roubtsov