|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.osgi.util.NLS
public abstract class NLS
Common superclass for all message bundle classes. Provides convenience methods for manipulating messages.
The #bind methods perform string substitution and should be considered a
convenience and not a full substitute replacement for MessageFormat#format
method calls.
Text appearing within curly braces in the given message, will be interpreted
as a numeric index to the corresponding substitution object in the given array. Calling
the #bind methods with text that does not map to an integer will result in an
IllegalArgumentException.
Text appearing within single quotes is treated as a literal. A single quote is escaped by a preceeding single quote.
Clients who wish to use the full substitution power of the MessageFormat class should
call that class directly and not use these #bind methods.
Clients may subclass this type.
| Constructor Summary | |
|---|---|
protected |
NLS()
Creates a new NLS instance. |
| Method Summary | |
|---|---|
static String |
bind(String message,
Object binding)
Bind the given message's substitution locations with the given string value. |
static String |
bind(String message,
Object[] bindings)
Bind the given message's substitution locations with the given string values. |
static String |
bind(String message,
Object binding1,
Object binding2)
Bind the given message's substitution locations with the given string values. |
static void |
initializeMessages(String bundleName,
Class clazz)
Initialize the given class with the values from the specified message bundle. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected NLS()
| Method Detail |
|---|
public static String bind(String message,
Object binding)
message - the message to be manipulatedbinding - the object to be inserted into the message
public static String bind(String message,
Object binding1,
Object binding2)
message - the message to be manipulatedbinding1 - An object to be inserted into the messagebinding2 - A second object to be inserted into the message
public static String bind(String message,
Object[] bindings)
message - the message to be manipulatedbindings - An array of objects to be inserted into the message
public static void initializeMessages(String bundleName,
Class clazz)
bundleName - fully qualified path of the class nameclazz - the class where the constants will exist
|
Eclipse Platform Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.