org.nuiton.i18n.init
Class ClassPathI18nInitializer

java.lang.Object
  extended by org.nuiton.i18n.init.I18nInitializer
      extended by org.nuiton.i18n.init.ClassPathI18nInitializer

public class ClassPathI18nInitializer
extends I18nInitializer

Implementation of a I18nInitializer using all i18n resources (from artifacts) discovered in classpath.

Will scan all classpath.

Note: No order can be predicted with this implementation on bundles.

Since:
1.1
Author:
tchemit

Field Summary
protected  URL[] extraURLs
           
protected  ClassLoader loader
          class loader to use (optional)
 
Fields inherited from class org.nuiton.i18n.init.I18nInitializer
encoding, messageFormatter
 
Constructor Summary
ClassPathI18nInitializer()
           
ClassPathI18nInitializer(ClassLoader loader)
           
ClassPathI18nInitializer(ClassLoader loader, URL[] extraURLs)
           
 
Method Summary
 URL[] getExtraURLs()
           
 ClassLoader getLoader()
           
 I18nBundle[] resolvBundles()
          Resolv the bundles.
 URL[] resolvURLs()
           
 
Methods inherited from class org.nuiton.i18n.init.I18nInitializer
getEncoding, getMessageFormatter, resolvBundles, setEncoding, setMessageFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loader

protected ClassLoader loader
class loader to use (optional)


extraURLs

protected URL[] extraURLs
Constructor Detail

ClassPathI18nInitializer

public ClassPathI18nInitializer()

ClassPathI18nInitializer

public ClassPathI18nInitializer(ClassLoader loader)

ClassPathI18nInitializer

public ClassPathI18nInitializer(ClassLoader loader,
                                URL[] extraURLs)
Method Detail

resolvURLs

public URL[] resolvURLs()
                 throws Exception
Throws:
Exception

resolvBundles

public I18nBundle[] resolvBundles()
                           throws Exception
Description copied from class: I18nInitializer
Resolv the bundles.

Specified by:
resolvBundles in class I18nInitializer
Returns:
the bundles detected
Throws:
Exception - if any pb while getting bundles

getExtraURLs

public URL[] getExtraURLs()

getLoader

public ClassLoader getLoader()


Copyright © 2004-2011 CodeLutin. All Rights Reserved.