org.jvnet.hk2.config
Interface Translator
- All Known Implementing Classes:
- 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
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.
translate
String translate(String str)
throws TranslationException
- Throws:
TranslationException
Copyright © 2013 Oracle Corporation. All Rights Reserved.