Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


oracle.javatools.util
Class FormatBundle

java.lang.Object
  extended by oracle.javatools.util.FormatBundle


public class FormatBundle
extends java.lang.Object

A formatting resource provider that wraps a java.util.ResourceBundle.


Constructor Summary
FormatBundle(java.lang.Class type)
          Creates a formatting resource bundle for a type.
FormatBundle(java.util.ResourceBundle bundle)
          Creates the formatting resource bundle from a resource bundle.
FormatBundle(java.lang.String bundleName)
          Creates a formatting resource bundle.

 

Method Summary
 java.lang.StringBuffer append(java.lang.StringBuffer buffer, java.lang.String key, java.lang.Object... arguments)
          Append the formatted string corresponding to a key and an array of arguments.
 boolean contains(java.lang.String key)
          Gets true if the bundle contains a string corresponding to a key.
 java.lang.String get(java.lang.String key)
          Gets the formatted string corresponding to a key.
 java.lang.String get(java.lang.String key, java.lang.Object... arguments)
          Gets the formatted string corresponding to a key and an array of arguments.
 java.util.ResourceBundle getBundle()
          Gets the ResourceBundle underlying this FormatBundle.

 

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

 

Constructor Detail

FormatBundle

public FormatBundle(java.util.ResourceBundle bundle)
Creates the formatting resource bundle from a resource bundle.

FormatBundle

public FormatBundle(java.lang.String bundleName)
Creates a formatting resource bundle.
Parameters:
bundleName - The name of the resource bundle.

FormatBundle

public FormatBundle(java.lang.Class type)
Creates a formatting resource bundle for a type.

Unless the type is a subclass of ResourceBundle, the bundle name will be the type name with "Bundle" appended.

Parameters:
type - The type identifying the resource bundle.

Method Detail

get

public java.lang.String get(java.lang.String key)
Gets the formatted string corresponding to a key.
Parameters:
key - The key in the resource bundle of the format string.

get

public java.lang.String get(java.lang.String key,
                            java.lang.Object... arguments)
Gets the formatted string corresponding to a key and an array of arguments.
Parameters:
key - The key in the resource bundle of the format string.
arguments - The arguments.

append

public java.lang.StringBuffer append(java.lang.StringBuffer buffer,
                                     java.lang.String key,
                                     java.lang.Object... arguments)
Append the formatted string corresponding to a key and an array of arguments.
Parameters:
buffer - The buffer to which to append.
key - The key in the resource bundle of the format string.
arguments - The arguments.

contains

public boolean contains(java.lang.String key)
Gets true if the bundle contains a string corresponding to a key.
Parameters:
key - The key in the resource bundle of the string.

getBundle

public java.util.ResourceBundle getBundle()
Gets the ResourceBundle underlying this FormatBundle.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.7.2)

E13403-10


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