2005/5/9

     
 

class ResourceBundle

artefaktur
Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   Namespace Members   Compound Members   Related Pages  

acdk::util::ResourceBundle Class Reference

#include <ResourceBundle.h>

Inheritance diagram for acdk::util::ResourceBundle:

acdk::lang::Object acdk::lang::ObjectBase acdk::lang::dmi::StdDispatch acdk::util::ListResourceBundle acdk::util::PropertyResourceBundle acdk::util::SimpleListResourceBundle List of all members.

Detailed Description

API: Java<br/>.

Author:
Roger Rene Kommer (mailto:kommer@artefaktur.com)
Version:
Revision
1.19
Date:
Date
2005/04/09 19:26:57
The ResourceBundle tries first to load a class on given name. If no class was not found it try to load a property file. The BundleName com.artefaktur.MyStrings will try to load a property file $ACDKHOME/cfg/com/artefaktur/MyString[locale].properties. The resolution of [locale] are resolved equal to Java spec


Public Member Functions

 ResourceBundle ()
virtual bool hasValue (IN(RString) key)
virtual RString getString (IN(RString) key) throw ( RMissingResourceException )
virtual RStringArray getStringArray (IN(RString) key) throw ( RMissingResourceException )
virtual RMap getMap (IN(RString) key) throw ( RMissingResourceException )
 ACDK extension return a String to String map of values.

virtual acdk::lang::Object getObject (IN(RString) key) throw ( RMissingResourceException )
RLocale getLocale ()
virtual RIterator getKeys ()=0

Static Public Member Functions

RResourceBundle getBundle (IN(RString) baseName, IN(RLocale) locale=Nil, IN(RClassLoader) classLoader=Nil) throw ( RMissingResourceException )
 load a resourcebundle

void flushResourceBundleCache ()
 resets the cache of loaded ResourceBundles


Protected Member Functions

virtual acdk::lang::Object handleGetObject (IN(RString) key)=0
 Nil values are by default not a valid ressource bundle value Different to the Java spec this method should not throw an exception but simply return Nil;.

void setParent (IN(RResourceBundle) parent)

Protected Attributes

RResourceBundle _parent
RLocale _locale

Static Private Member Functions

 OUT (RMap) _resourceBundleCache()
RResourceBundle _lockupPropertiesRessource (IN(RString) baseName, IN(RLocale) locale, IN(RClassLoader) classLoader)
RPropertyResourceBundle _tryLoadPropertiesRessource (IN(RString) componentname, IN(RClassLoader) classLoader, OUT(bool) cached)
RPropertyResourceBundle _lookupPropResBundle (IN(RString) baseName, IN(RClassLoader) classLoader, INOUT(RString) language, INOUT(RString) country, INOUT(RString) variant, OUT(bool) cached)
RClass _lookupRessourceClass (IN(RString) componentname, IN(RClassLoader) classLoader)
RClass _lockupClassRessource (IN(RString) baseName, IN(RLocale) locale, IN(RClassLoader) classLoader)


Constructor & Destructor Documentation

acdk::util::ResourceBundle::ResourceBundle  )  [inline]
 


Member Function Documentation

RClass acdk::util::ResourceBundle::_lockupClassRessource IN(RString baseName,
IN(RLocale locale,
IN(RClassLoader classLoader
[static, private]
 

RResourceBundle acdk::util::ResourceBundle::_lockupPropertiesRessource IN(RString baseName,
IN(RLocale locale,
IN(RClassLoader classLoader
[static, private]
 

RPropertyResourceBundle acdk::util::ResourceBundle::_lookupPropResBundle IN(RString baseName,
IN(RClassLoader classLoader,
INOUT(RString language,
INOUT(RString country,
INOUT(RString variant,
OUT(bool)  cached
[static, private]
 

RClass acdk::util::ResourceBundle::_lookupRessourceClass IN(RString componentname,
IN(RClassLoader classLoader
[static, private]
 

RPropertyResourceBundle acdk::util::ResourceBundle::_tryLoadPropertiesRessource IN(RString componentname,
IN(RClassLoader classLoader,
OUT(bool)  cached
[static, private]
 

void acdk::util::ResourceBundle::flushResourceBundleCache  )  [static]
 

resets the cache of loaded ResourceBundles

RResourceBundle acdk::util::ResourceBundle::getBundle IN(RString baseName,
IN(RLocale locale = Nil,
IN(RClassLoader classLoader = Nil
throw ( RMissingResourceException ) [static]
 

load a resourcebundle

Parameters:
baseName name without locale
locale the locale to use. if this parameter is Nil Locale::getDefault() will be used
classLoader the classLoader to use loading Class or Resource. If this is Nil use ClassLoader::getSystemClassLoader()

virtual RIterator acdk::util::ResourceBundle::getKeys  )  [pure virtual]
 

Implemented in acdk::util::ListResourceBundle, acdk::util::PropertyResourceBundle, and acdk::util::SimpleListResourceBundle.

RLocale acdk::util::ResourceBundle::getLocale  )  [inline]
 

virtual RMap acdk::util::ResourceBundle::getMap IN(RString key  )  throw ( RMissingResourceException ) [virtual]
 

ACDK extension return a String to String map of values.

Reimplemented in acdk::util::PropertyResourceBundle.

virtual acdk::lang::Object acdk::util::ResourceBundle::getObject IN(RString key  )  throw ( RMissingResourceException ) [virtual]
 

virtual RString acdk::util::ResourceBundle::getString IN(RString key  )  throw ( RMissingResourceException ) [inline, virtual]
 

virtual RStringArray acdk::util::ResourceBundle::getStringArray IN(RString key  )  throw ( RMissingResourceException ) [virtual]
 

Reimplemented in acdk::util::PropertyResourceBundle.

virtual acdk::lang::Object acdk::util::ResourceBundle::handleGetObject IN(RString key  )  [protected, pure virtual]
 

Nil values are by default not a valid ressource bundle value Different to the Java spec this method should not throw an exception but simply return Nil;.

Implemented in acdk::util::ListResourceBundle, and acdk::util::PropertyResourceBundle.

virtual bool acdk::util::ResourceBundle::hasValue IN(RString key  )  [virtual]
 

Reimplemented in acdk::util::PropertyResourceBundle.

acdk::util::ResourceBundle::OUT RMap   )  [static, private]
 

void acdk::util::ResourceBundle::setParent IN(RResourceBundle parent  )  [inline, protected]
 


Member Data Documentation

RLocale acdk::util::ResourceBundle::_locale [protected]
 

RResourceBundle acdk::util::ResourceBundle::_parent [protected]