01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2003-2006, Geotools Project Managment Committee (PMC)
05: * (C) 2001, Institut de Recherche pour le Développement
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation; either
10: * version 2.1 of the License, or (at your option) any later version.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.resources;
18:
19: import java.text.MessageFormat;
20:
21: /**
22: * {link java.util.ResourceBundle} implementation using integers instead of strings for resource
23: * keys. Because it doesn't use strings, this implementation avoids adding all those string
24: * constants to {@code .class} files and runtime images. Developers still have meaningful labels
25: * in their code (e.g. {@code DIMENSION_MISMATCH}) through a set of constants defined in interfaces.
26: * This approach furthermore gives the benefit of compile-time safety. Because integer constants are
27: * inlined right into class files at compile time, the declarative interface is never loaded at run
28: * time. This class also provides facilities for string formatting using {@link MessageFormat}.
29: *
30: * @since 2.0
31: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/metadata/src/main/java/org/geotools/resources/ResourceBundle.java $
32: * @version $Id: ResourceBundle.java 26165 2007-07-06 17:02:26Z desruisseaux $
33: * @author Martin Desruisseaux
34: *
35: * @deprecated Renamed as {@link IndexedResourceBundle}.
36: */
37: public class ResourceBundle extends IndexedResourceBundle {
38: /**
39: * Constructs a new resource bundle. The resource filename will be inferred
40: * from the fully qualified classname of this {@code ResourceBundle} subclass.
41: *
42: * @since 2.2
43: */
44: protected ResourceBundle() {
45: super ();
46: }
47:
48: /**
49: * Constructs a new resource bundle.
50: *
51: * @param filename The resource name containing resources.
52: * It may be a filename or an entry in a JAR file.
53: */
54: protected ResourceBundle(final String filename) {
55: super(filename);
56: }
57: }
|