Java Doc for IndexedResourceBundle.java in  » GIS » GeoTools-2.4.1 » org » geotools » resources » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.resources 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.geotools.resources.IndexedResourceBundle
   org.geotools.resources.ResourceBundle
      org.geotools.resources.IndexedResourceBundle

All known Subclasses:   org.geotools.resources.ResourceBundle,
IndexedResourceBundle
public class IndexedResourceBundle extends ResourceBundle (Code)
ResourceBundle implementation using integers instead of strings for resource keys. Because it doesn't use strings, this implementation avoids adding all those string constants to .class files and runtime images. Developers still have meaningful labels in their code (e.g. DIMENSION_MISMATCH ) through a set of constants defined in interfaces. This approach furthermore gives the benefit of compile-time safety. Because integer constants are inlined right into class files at compile time, the declarative interface is never loaded at run time. This class also provides facilities for string formatting using MessageFormat .
since:
   2.4
version:
   $Id: IndexedResourceBundle.java 27862 2007-11-12 19:51:19Z desruisseaux $
author:
   Martin Desruisseaux



Constructor Summary
protected  IndexedResourceBundle()
     Constructs a new resource bundle.
protected  IndexedResourceBundle(String filename)
     Constructs a new resource bundle.

Method Summary
public static  Stringformat(LogRecord record)
     Localize and format the message string from a log record.
final public  EnumerationgetKeys()
     Returns an enumeration of the keys.
final public  StringgetLabel(int key)
     Gets a string for the given key and appends ": " to it. This method is typically used for creating labels.
Parameters:
  key - The key for the desired string.
public  LogRecordgetLogRecord(Level level, int key)
     Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
public  LogRecordgetLogRecord(Level level, int key, Object arg0)
     Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The parameter for the log message, or null .
public  LogRecordgetLogRecord(Level level, int key, Object arg0, Object arg1)
     Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The first parameter.
Parameters:
  arg1 - The second parameter.
public  LogRecordgetLogRecord(Level level, int key, Object arg0, Object arg1, Object arg2)
     Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The first parameter.
Parameters:
  arg1 - The second parameter.
Parameters:
  arg2 - The third parameter.
public  LogRecordgetLogRecord(Level level, int key, Object arg0, Object arg1, Object arg2, Object arg3)
     Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The first parameter.
Parameters:
  arg1 - The second parameter.
Parameters:
  arg2 - The third parameter.
Parameters:
  arg3 - The fourth parameter.
final public  StringgetMenuLabel(int key)
     Gets a string for the given key and appends "..." to it. This method is typically used for creating menu items.
Parameters:
  key - The key for the desired string.
final public  StringgetString(int key)
     Gets a string for the given key from this resource bundle or one of its parents.
Parameters:
  key - The key for the desired string.
final public  StringgetString(int key, Object arg0)
     Gets a string for the given key and formats it with the specified argument.
final public  StringgetString(int key, Object arg0, Object arg1)
     Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}".
final public  StringgetString(int key, Object arg0, Object arg1, Object arg2)
     Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}".
Parameters:
  arg2 - Value to substitute for "{2}".
final public  StringgetString(int key, Object arg0, Object arg1, Object arg2, Object arg3)
     Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}".
Parameters:
  arg2 - Value to substitute for "{2}".
Parameters:
  arg3 - Value to substitute for "{3}".
final public  StringgetString(int key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
     Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}".
Parameters:
  arg2 - Value to substitute for "{2}".
Parameters:
  arg3 - Value to substitute for "{3}".
Parameters:
  arg4 - Value to substitute for "{4}".
final protected  ObjecthandleGetObject(String key)
     Gets an object for the given key from this resource bundle.
final public  voidlist(Writer out)
     Lists resources to the specified stream.
public synchronized  StringtoString()
     Returns a string representation of this object.


Constructor Detail
IndexedResourceBundle
protected IndexedResourceBundle()(Code)
Constructs a new resource bundle. The resource filename will be inferred from the fully qualified classname of this IndexedResourceBundle subclass.



IndexedResourceBundle
protected IndexedResourceBundle(String filename)(Code)
Constructs a new resource bundle.
Parameters:
  filename - The resource name containing resources.It may be a filename or an entry in a JAR file.




Method Detail
format
public static String format(LogRecord record)(Code)
Localize and format the message string from a log record. This method performs a work similar to java.util.logging.Formatter.formatMessage , except that the work will be delegated to IndexedResourceBundle.getString(int,Object) if the is an instance of IndexedResourceBundle .
Parameters:
  record - The log record to format. The formatted message.



getKeys
final public Enumeration getKeys()(Code)
Returns an enumeration of the keys.



getLabel
final public String getLabel(int key) throws MissingResourceException(Code)
Gets a string for the given key and appends ": " to it. This method is typically used for creating labels.
Parameters:
  key - The key for the desired string. The string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.



getLogRecord
public LogRecord getLogRecord(Level level, int key)(Code)
Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key. The log record.



getLogRecord
public LogRecord getLogRecord(Level level, int key, Object arg0)(Code)
Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The parameter for the log message, or null . The log record.



getLogRecord
public LogRecord getLogRecord(Level level, int key, Object arg0, Object arg1)(Code)
Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The first parameter.
Parameters:
  arg1 - The second parameter. The log record.



getLogRecord
public LogRecord getLogRecord(Level level, int key, Object arg0, Object arg1, Object arg2)(Code)
Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The first parameter.
Parameters:
  arg1 - The second parameter.
Parameters:
  arg2 - The third parameter. The log record.



getLogRecord
public LogRecord getLogRecord(Level level, int key, Object arg0, Object arg1, Object arg2, Object arg3)(Code)
Gets a localized log record.
Parameters:
  level - The log record level.
Parameters:
  key - The resource key.
Parameters:
  arg0 - The first parameter.
Parameters:
  arg1 - The second parameter.
Parameters:
  arg2 - The third parameter.
Parameters:
  arg3 - The fourth parameter. The log record.



getMenuLabel
final public String getMenuLabel(int key) throws MissingResourceException(Code)
Gets a string for the given key and appends "..." to it. This method is typically used for creating menu items.
Parameters:
  key - The key for the desired string. The string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.



getString
final public String getString(int key) throws MissingResourceException(Code)
Gets a string for the given key from this resource bundle or one of its parents.
Parameters:
  key - The key for the desired string. The string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.



getString
final public String getString(int key, Object arg0) throws MissingResourceException(Code)
Gets a string for the given key and formats it with the specified argument. The message is formatted using MessageFormat . Calling this method is approximately equivalent to calling:
 String pattern = getString(key);
 Format f = new MessageFormat(pattern);
 return f.format(arg0);
 
If arg0 is not already an array, it will be placed into an array of length 1. Using MessageFormat , all occurrences of "{0}", "{1}", "{2}" in the resource string will be replaced by arg0[0] , arg0[1] , arg0[2] , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - A single object or an array of objects to be formatted and substituted. The string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.
See Also:   IndexedResourceBundle.getString(String)
See Also:   IndexedResourceBundle.getString(int,Object,Object)
See Also:   IndexedResourceBundle.getString(int,Object,Object,Object)
See Also:   MessageFormat



getString
final public String getString(int key, Object arg0, Object arg1) throws MissingResourceException(Code)
Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}". The formatted string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.



getString
final public String getString(int key, Object arg0, Object arg1, Object arg2) throws MissingResourceException(Code)
Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}".
Parameters:
  arg2 - Value to substitute for "{2}". The formatted string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.



getString
final public String getString(int key, Object arg0, Object arg1, Object arg2, Object arg3) throws MissingResourceException(Code)
Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}".
Parameters:
  arg2 - Value to substitute for "{2}".
Parameters:
  arg3 - Value to substitute for "{3}". The formatted string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.



getString
final public String getString(int key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) throws MissingResourceException(Code)
Gets a string for the given key and replaces all occurrences of "{0}", "{1}", with values of arg0 , arg1 , etc.
Parameters:
  key - The key for the desired string.
Parameters:
  arg0 - Value to substitute for "{0}".
Parameters:
  arg1 - Value to substitute for "{1}".
Parameters:
  arg2 - Value to substitute for "{2}".
Parameters:
  arg3 - Value to substitute for "{3}".
Parameters:
  arg4 - Value to substitute for "{4}". The formatted string for the given key.
throws:
  MissingResourceException - If no object for the given key can be found.



handleGetObject
final protected Object handleGetObject(String key)(Code)
Gets an object for the given key from this resource bundle. Returns null if this resource bundle does not contain an object for the given key.
Parameters:
  key - the key for the desired object
exception:
  NullPointerException - if key is null the object for the given key, or null



list
final public void list(Writer out) throws IOException(Code)
Lists resources to the specified stream. If a resource has more than one line, only the first line will be written. This method is used mostly for debugging purposes.
Parameters:
  out - The destination stream.
throws:
  IOException - if an output operation failed.



toString
public synchronized String toString()(Code)
Returns a string representation of this object. This method is for debugging purposes only.




Methods inherited from org.geotools.resources.IndexedResourceBundle
public static String format(LogRecord record)(Code)(Java Doc)
final public Enumeration getKeys()(Code)(Java Doc)
final public String getLabel(int key) throws MissingResourceException(Code)(Java Doc)
public LogRecord getLogRecord(Level level, int key)(Code)(Java Doc)
public LogRecord getLogRecord(Level level, int key, Object arg0)(Code)(Java Doc)
public LogRecord getLogRecord(Level level, int key, Object arg0, Object arg1)(Code)(Java Doc)
public LogRecord getLogRecord(Level level, int key, Object arg0, Object arg1, Object arg2)(Code)(Java Doc)
public LogRecord getLogRecord(Level level, int key, Object arg0, Object arg1, Object arg2, Object arg3)(Code)(Java Doc)
final public String getMenuLabel(int key) throws MissingResourceException(Code)(Java Doc)
final public String getString(int key) throws MissingResourceException(Code)(Java Doc)
final public String getString(int key, Object arg0) throws MissingResourceException(Code)(Java Doc)
final public String getString(int key, Object arg0, Object arg1) throws MissingResourceException(Code)(Java Doc)
final public String getString(int key, Object arg0, Object arg1, Object arg2) throws MissingResourceException(Code)(Java Doc)
final public String getString(int key, Object arg0, Object arg1, Object arg2, Object arg3) throws MissingResourceException(Code)(Java Doc)
final public String getString(int key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) throws MissingResourceException(Code)(Java Doc)
final protected Object handleGetObject(String key)(Code)(Java Doc)
final public void list(Writer out) throws IOException(Code)(Java Doc)
public synchronized String toString()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.