01: /*
02: *
03: *
04: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: */
26:
27: package com.sun.perseus.j2d;
28:
29: import com.sun.perseus.platform.MessagesSupport;
30:
31: /**
32: *
33: * @version $Id: Messages.java,v 1.2 2006/04/21 06:35:04 st125089 Exp $
34: */
35: class Messages {
36: /**
37: * Used when invoking the given method on the given interface with
38: * an out of bound parameter value.
39: *
40: * {0} : interface name.
41: * {1} : method name.
42: * {2} : parameter name.
43: * {3} : value.
44: */
45: public static final String ERROR_OUT_OF_BOUND_PARAMETER_VALUE = "error.out.of.bound.parameter.value";
46:
47: /**
48: * The error messages bundle class name.
49: */
50: protected static final String RESOURCES = "com.sun.perseus.j2d.resources.Messages";
51:
52: /**
53: * The localizable support for the error messages.
54: */
55: protected static MessagesSupport messagesSupport = new MessagesSupport(
56: RESOURCES);
57:
58: /**
59: * Formats the message identified by <tt>key</tt> with the input
60: * arguments.
61: *
62: * @param key the message's key
63: * @param args the arguments used to format the message
64: * @return the formatted message
65: */
66: static String formatMessage(final String key, final Object[] args) {
67: return messagesSupport.formatMessage(key, args);
68: }
69: }
|