Package org.jvnet.hk2.config
Interface Translator
-
- All Known Implementing Classes:
AttributeResolverHelper
,VariableResolver
public interface Translator
Used to perform string pre-processing on values found in the configuration file.This hook allows applications to support variable expansions like Ant in the configuration file.
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description static Translator
NOOP
Translator
that does nothing.static Translator
SYS_PROP_TR
A translator that does translation from the system properties.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
translate(String str)
-
-
-
Field Detail
-
NOOP
static final Translator NOOP
Translator
that does nothing.
-
SYS_PROP_TR
static final Translator SYS_PROP_TR
A translator that does translation from the system properties. Thus, any reference to an existing System Property like "${name}" will be replaced by its value, i.e. System.getProperty("name"). All found references are translated. If a System Property is not defined, its reference is returned verbatim. No escape sequences are handled.
-
-
Method Detail
-
translate
String translate(String str) throws TranslationException
- Throws:
TranslationException
-
-