Java Doc for Messages.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » annotation » internal » nls » 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 » Apache Harmony Java SE » org package » org.apache.harmony.annotation.internal.nls 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.annotation.internal.nls.Messages

Messages
public class Messages (Code)
This class retrieves strings from a resource bundle and returns them, formatting them with MessageFormat when required.

It is used by the system classes to provide national language support, by looking up messages in the org.apache.harmony.annotation.internal.nls.messages resource bundle. Note that if this file is not available, or an invalid key is looked up, or resource bundle support is not available, the key itself will be returned as the associated message. This means that the KEY should a reasonable human-readable (english) string.





Method Summary
public static  Stringformat(String format, Object[] args)
     Generates a formatted text string given a source string containing "argument markers" of the form "{argNum}" where each argNum must be in the range 0..9.
public static  StringgetString(String msg)
     Retrieves a message which has no arguments.
Parameters:
  msg - String the key to look up.
public static  StringgetString(String msg, Object arg)
     Retrieves a message which takes 1 argument.
Parameters:
  msg - String the key to look up.
Parameters:
  arg - Object the object to insert in the formatted output.
public static  StringgetString(String msg, int arg)
     Retrieves a message which takes 1 integer argument.
Parameters:
  msg - String the key to look up.
Parameters:
  arg - int the integer to insert in the formatted output.
public static  StringgetString(String msg, char arg)
     Retrieves a message which takes 1 character argument.
Parameters:
  msg - String the key to look up.
Parameters:
  arg - char the character to insert in the formatted output.
public static  StringgetString(String msg, Object arg1, Object arg2)
     Retrieves a message which takes 2 arguments.
Parameters:
  msg - String the key to look up.
Parameters:
  arg1 - Object an object to insert in the formatted output.
Parameters:
  arg2 - Object another object to insert in the formatted output.
public static  StringgetString(String msg, Object[] args)
     Retrieves a message which takes several arguments.
Parameters:
  msg - String the key to look up.
Parameters:
  args - Object[] the objects to insert in the formatted output.
public static  ResourceBundlesetLocale(Locale locale, String resource)
     Changes the locale of the messages.



Method Detail
format
public static String format(String format, Object[] args)(Code)
Generates a formatted text string given a source string containing "argument markers" of the form "{argNum}" where each argNum must be in the range 0..9. The result is generated by inserting the toString of each argument into the position indicated in the string.

To insert the "{" character into the output, use a single backslash character to escape it (i.e. "\{"). The "}" character does not need to be escaped.
Parameters:
  format - String the format to use when printing.
Parameters:
  args - Object[] the arguments to use. String the formatted message.




getString
public static String getString(String msg)(Code)
Retrieves a message which has no arguments.
Parameters:
  msg - String the key to look up. String the message for that key in the system message bundle.



getString
public static String getString(String msg, Object arg)(Code)
Retrieves a message which takes 1 argument.
Parameters:
  msg - String the key to look up.
Parameters:
  arg - Object the object to insert in the formatted output. String the message for that key in the system message bundle.



getString
public static String getString(String msg, int arg)(Code)
Retrieves a message which takes 1 integer argument.
Parameters:
  msg - String the key to look up.
Parameters:
  arg - int the integer to insert in the formatted output. String the message for that key in the system message bundle.



getString
public static String getString(String msg, char arg)(Code)
Retrieves a message which takes 1 character argument.
Parameters:
  msg - String the key to look up.
Parameters:
  arg - char the character to insert in the formatted output. String the message for that key in the system message bundle.



getString
public static String getString(String msg, Object arg1, Object arg2)(Code)
Retrieves a message which takes 2 arguments.
Parameters:
  msg - String the key to look up.
Parameters:
  arg1 - Object an object to insert in the formatted output.
Parameters:
  arg2 - Object another object to insert in the formatted output. String the message for that key in the system message bundle.



getString
public static String getString(String msg, Object[] args)(Code)
Retrieves a message which takes several arguments.
Parameters:
  msg - String the key to look up.
Parameters:
  args - Object[] the objects to insert in the formatted output. String the message for that key in the system message bundle.



setLocale
public static ResourceBundle setLocale(Locale locale, String resource)(Code)
Changes the locale of the messages.
Parameters:
  locale - Locale the locale to change to.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.