org.hyphenType.util.resourcebundles
Class AliasResourceBundle

java.lang.Object
  extended by org.hyphenType.util.resourcebundles.AliasResourceBundle

public final class AliasResourceBundle
extends Object

Author:
Aurelio Akira M. Matsui

Field Summary
static String ALIAS_DECLARATION_PREFIX
           
 
Method Summary
static ResourceBundle convert(ResourceBundle rb)
          Takes a resource bundle and creates a new one with the aliases replaced.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIAS_DECLARATION_PREFIX

public static final String ALIAS_DECLARATION_PREFIX
See Also:
Constant Field Values
Method Detail

convert

public static ResourceBundle convert(ResourceBundle rb)
Takes a resource bundle and creates a new one with the aliases replaced. Will search for properties in the format "alias.name", where name is the name of the alias. Whenever an alias is found, replaces this alias as a prefix, whenever the prefix is found as the start of any property. For example, takes the following
 alias.x = blablablablablablablabla
 alias.y = yyyy
 ${x} = A
 ${x}.b = Z
 ${x}.${y} = W
 
and converts into the following:
 blablablablablablablabla = A
 blablablablablablablabla.b = Z
 blablablablablablablabla.yyyy = W
 

Parameters:
rb - The resource bundle to convert.
Returns:
The converted resource bundle.


Copyright © 2013. All Rights Reserved.