Regain 2.1.0-STABLE API

net.sf.regain.util.io
Class MultiLocalizer

java.lang.Object
  extended by net.sf.regain.util.io.MultiLocalizer

public class MultiLocalizer
extends Object

Holds localizers for multiple locales.

Author:
Til Schneider, www.murfman.de

Nested Class Summary
private static class MultiLocalizer.BaseLocalizerFactory
          A factory that creates localizers for a specific base.
private static class MultiLocalizer.ClassLocalizerFactory
          A factory that creates localizers for a specific class.
private static interface MultiLocalizer.LocalizerFactory
          A factory to use for creating a localizer for a specific locale.
 
Field Summary
private  MultiLocalizer.LocalizerFactory mFactory
          The factory to use for creating a localizer for a specific locale.
private  HashMap<Locale,Localizer> mLocalizerHash
          Holds for a locale (Locale) a localizer (Localizer)
 
Constructor Summary
MultiLocalizer(Class<?> clazz)
          Creates a new instance of MultiLocalizer.
MultiLocalizer(URL baseurl, String basename)
          Creates a new instance of MultiLocalizer.
 
Method Summary
 Localizer getLocalizer(Locale locale)
          Gets the localizer for a specific locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mFactory

private MultiLocalizer.LocalizerFactory mFactory
The factory to use for creating a localizer for a specific locale.


mLocalizerHash

private HashMap<Locale,Localizer> mLocalizerHash
Holds for a locale (Locale) a localizer (Localizer)

Constructor Detail

MultiLocalizer

public MultiLocalizer(Class<?> clazz)
Creates a new instance of MultiLocalizer.

Parameters:
clazz - The class to create the MultiLocalizer for.

MultiLocalizer

public MultiLocalizer(URL baseurl,
                      String basename)
Creates a new instance of MultiLocalizer.

Parameters:
baseurl - The URL to load the resource bundle from.
basename - The basename of the resource bundle to load.
Method Detail

getLocalizer

public Localizer getLocalizer(Locale locale)
Gets the localizer for a specific locale.

Parameters:
locale - The locale to get the localizer for.
Returns:
The localizer.

Regain 2.1.0-STABLE API

Regain 2.1.0-STABLE, Copyright (C) 2004-2010 Til Schneider, www.murfman.de, Thomas Tesche, www.clustersystems.info