Klasse Resources
java.lang.Object
org.jdrupes.mdoclet.internal.doclets.toolkit.Resources
Access to the localizable resources used by a doclet.
The resources are split across two resource bundles: one that contains format-neutral strings common to all supported formats, and one that contains strings specific to the selected doclet, such as the standard HTML doclet.
-
Feldübersicht
Modifizierer und TypFeldBeschreibungprotected final ResourceBundle
protected final ResourceBundle
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the string for the given key from one of the doclet’s resource bundles.Returns the string for the given key (after applying the current mapper if it is not null) from one of the doclet’s resource bundles, substituting additional arguments into into the resulting string withMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
.void
setKeyMapper
(Function<String, String> mapper)
-
Felddetails
-
commonBundle
-
docletBundle
-
mapper
-
-
Konstruktordetails
-
Resources
Creates a Resources object to provide access the resource bundles used by a doclet.- Parameter:
locale
- the locale to be used when accessing the resource bundles.commonBundleName
- the name of the bundle containing the strings common to all output formatsdocletBundleName
- the name of the bundle containing the strings specific to a particular format
-
-
Methodendetails
-
setKeyMapper
-
getText
Returns the string for the given key from one of the doclet’s resource bundles.If the current mapper is not null, it will be applied to the key before looking up the resulting key in the resource bundle(s).
The more specific bundle is checked first; if it is not there, the common bundle is then checked.
- Parameter:
key
- the key for the desired string- Gibt zurück:
- the string for the given key
- Löst aus:
MissingResourceException
- if the key is not found in either bundle.
-
getText
Returns the string for the given key (after applying the current mapper if it is not null) from one of the doclet’s resource bundles, substituting additional arguments into into the resulting string withMessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
.The more specific bundle is checked first; if it is not there, the common bundle is then checked.
- Parameter:
key
- the key for the desired stringargs
- values to be substituted into the resulting string- Gibt zurück:
- the string for the given key
- Löst aus:
MissingResourceException
- if the key is not found in either bundle.
-