01: /**
02: * Copyright (C) 2001-2005 France Telecom R&D
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */package org.objectweb.speedo.locale;
18:
19: import java.util.ResourceBundle;
20:
21: /**
22: * References all ResourceBundle provided by Speedo. Provides one static
23: * method for accessing each of them.
24: *
25: * @author P. Dechamboux
26: *
27: */
28: public class LocaleHelper {
29: private static String SPEEDORESOURCES = "org.objectweb.speedo.locale.SpeedoResources";
30: private static ResourceBundle speedoRB = null;
31:
32: public static ResourceBundle getSpeedoRB() {
33: if (speedoRB == null) {
34: speedoRB = ResourceBundle.getBundle(SPEEDORESOURCES);
35: }
36: return speedoRB;
37: }
38:
39: private static String EJBPARSERESOURCES = "org.objectweb.speedo.generation.parser.ejb.EJBParsingResources";
40: private static ResourceBundle ejbparsingRB = null;
41:
42: public static ResourceBundle getEJBParsingRB() {
43: if (ejbparsingRB == null) {
44: ejbparsingRB = ResourceBundle.getBundle(EJBPARSERESOURCES);
45: }
46: return ejbparsingRB;
47: }
48: }
|