public static class Localizers.GenericLocalizer extends Localizers.DomainAwareLocalizer implements RegisteringLocalizer
RegisteringLocalizer
interface
that makes use of Localizers.LocalizationAccessDescriptor
instances to
access registered objects in terms of localization. When told to
localize a given Object
it looks for a registered LocalizationAccessDescriptor
and uses its information to obtain localized texts and call the
appropriate method of the object being localized. Again only weak
references to registered objects are stored.domain
Constructor and Description |
---|
Localizers.GenericLocalizer(ResourceDomain domain) |
Modifier and Type | Method and Description |
---|---|
void |
localize(java.lang.Object item)
Localizes the provided
Object . |
void |
register(java.lang.Object item,
java.lang.Object data)
Stores localization data for a certain
Object . |
protected void |
set(java.lang.Object item,
java.lang.String key,
java.lang.String methodName) |
textString, tooltipString
public Localizers.GenericLocalizer(ResourceDomain domain)
domain
- public void localize(java.lang.Object item)
Localizer
Object
. The specific
meaning of localization
to be achieved is up
to the individual implementation.localize
in interface Localizer
item
- the Object
to localizeLocalizers
protected void set(java.lang.Object item, java.lang.String key, java.lang.String methodName)
public void register(java.lang.Object item, java.lang.Object data)
RegisteringLocalizer
Object
.
The nature and meaning of the data being stored is highly
implementation specific.register
in interface RegisteringLocalizer
item
- the item that requires localizationdata
- the data to be used when localizing the given Object