public abstract class AbstractHyphenatorBuilder extends AbstractLoggableComponent implements HyphenatorBuilder
HyphenatorBuilder interface. WeakReferences to the Hyphenators that have already been build. If a
Hyphenator is requested several times, it can typically be served from the cache.| Modifier and Type | Field and Description |
|---|---|
private ConcurrentHashMap<String,WeakReference<Hyphenator>> |
hyphenatorCache
Cache for
getHyphenator(Locale). |
private NlsResourceLocator |
resourceLocator
The resource locator.
|
| Constructor and Description |
|---|
AbstractHyphenatorBuilder()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Hyphenator |
createHyphenator(String localeInfix)
This method creates a new
Hyphenator. |
protected void |
doInitialize()
This method performs the actual
initialization. |
Hyphenator |
getHyphenator()
|
Hyphenator |
getHyphenator(Locale locale)
This method gets the
Hyphenator for the given Locale. |
protected NlsResourceLocator |
getResourceLocator() |
void |
setResourceLocator(NlsResourceLocator resourceLocator) |
createLogger, getLoggerdoInitialized, getInitializationState, initializeprivate final ConcurrentHashMap<String,WeakReference<Hyphenator>> hyphenatorCache
getHyphenator(Locale).private NlsResourceLocator resourceLocator
protected void doInitialize()
AbstractComponentinitialization. It is called when AbstractComponent.initialize() is
invoked for the first time. super.AbstractComponent.doInitialize().doInitialize in class AbstractLoggableComponentpublic Hyphenator getHyphenator()
HyphenatorBuildergetHyphenator in interface HyphenatorBuilderHyphenator.public Hyphenator getHyphenator(Locale locale)
HyphenatorBuilderHyphenator for the given Locale. If no hyphenation-rules are
available for the given Locale, a Hyphenator for a more general Locale is build.getHyphenator in interface HyphenatorBuilderlocale - is the Locale used to determine the hyphenation-rules for the according country and
region.Hyphenator.protected abstract Hyphenator createHyphenator(String localeInfix)
Hyphenator.localeInfix - is the locale-infix of the requested
Hyphenator.Hyphenator or null if no hyphenation configuration is available for the given
localeInfix.getHyphenator(Locale)protected NlsResourceLocator getResourceLocator()
@Inject public void setResourceLocator(NlsResourceLocator resourceLocator)
resourceLocator - is the resourceLocator to setCopyright © 2001–2016 mmm-Team. All rights reserved.