Skip navigation links

Oracle Fusion Middleware Design Time Java API Reference for Oracle ADF Faces and Data Visualization Components
11g Release 2 (11.1.2.3.0)

E18581-04


oracle.adfdt.view.common.binding.utils
Class FastMessageFormat

java.lang.Object
  extended by oracle.adfdt.view.common.binding.utils.FastMessageFormat


public class FastMessageFormat
extends java.lang.Object

The FastMessageFormat class is a greatly reduced version of the java.text.MessageFormat class. It's also much faster and much less expensive to create, which is especially valuable when it is created and thrown away many times - a common use case in web applications.

The only syntax supported by this class is simple index-based replacement, namely:

     some{1}text{0}here{2}andthere
 

as well as escaping using single quotes. Like MessageFormat, a single quote must be represented using two consecutive single quotes, but the contents of any text between single quotes will not be interpreted. So, the following pattern could be used to include a left bracket:

     some'{'text{0}
 

Copied from oracle.cabo.share.nls.FastMessageFormat with changes made for static access


Constructor Summary
FastMessageFormat(java.lang.String formatString)
          Creates a FastMessageFormat based on the given format string.

 

Method Summary
 java.lang.String format(java.lang.Object source)
           
 java.lang.String format(java.lang.Object[] source)
          Formats the given array of strings based on the initial pattern.
 java.lang.String format(java.lang.Object source1, java.lang.Object source2)
           
static java.lang.String formatMessage(char[] formatChars, java.lang.Object[] source)
           
static java.lang.String formatMessage(char[] formatChars, java.lang.String[] source)
           
static java.lang.String formatMessage(java.lang.String formatString, java.lang.Object[] source)
           
static java.lang.String formatMessage(java.lang.String formatString, java.lang.String source)
           
static java.lang.String formatMessage(java.lang.String formatString, java.lang.String source1, java.lang.String source2)
           
static java.lang.String formatMessage(java.lang.String formatString, java.lang.String source1, java.lang.String source2, java.lang.String source3)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

FastMessageFormat

public FastMessageFormat(java.lang.String formatString)
Creates a FastMessageFormat based on the given format string.

Method Detail

formatMessage

public static java.lang.String formatMessage(java.lang.String formatString,
                                             java.lang.Object[] source)

formatMessage

public static java.lang.String formatMessage(char[] formatChars,
                                             java.lang.Object[] source)

formatMessage

public static java.lang.String formatMessage(java.lang.String formatString,
                                             java.lang.String source)

formatMessage

public static java.lang.String formatMessage(java.lang.String formatString,
                                             java.lang.String source1,
                                             java.lang.String source2)

formatMessage

public static java.lang.String formatMessage(java.lang.String formatString,
                                             java.lang.String source1,
                                             java.lang.String source2,
                                             java.lang.String source3)

formatMessage

public static java.lang.String formatMessage(char[] formatChars,
                                             java.lang.String[] source)

format

public final java.lang.String format(java.lang.Object[] source)
Formats the given array of strings based on the initial pattern. It is legal for this array to be shorter than that indicated by the pattern, or to have null entries - these will simply be ignored.
Parameters:
source - an array of strings

format

public final java.lang.String format(java.lang.Object source)

format

public final java.lang.String format(java.lang.Object source1,
                                     java.lang.Object source2)

Skip navigation links

Oracle Fusion Middleware Design Time Java API Reference for Oracle ADF Faces and Data Visualization Components
11g Release 2 (11.1.2.3.0)

E18581-04


Copyright © 1997, 2012, Oracle. All rights reserved.