Package | Description |
---|---|
org.apache.commons.text |
Basic classes for text handling.
|
org.apache.commons.text.lookup |
Provides algorithms for looking up strings for use with a
StringSubstitutor . |
Modifier and Type | Class | Description |
---|---|---|
class |
StrLookup<V> |
Deprecated.
Deprecated as of 1.3, use
StringLookupFactory instead. |
Modifier and Type | Method | Description |
---|---|---|
StringLookup |
StringSubstitutor.getStringLookup() |
Gets the StringLookup that is used to lookup variables.
|
Modifier and Type | Method | Description |
---|---|---|
StringSubstitutor |
StringSubstitutor.setVariableResolver(StringLookup variableResolver) |
Sets the VariableResolver that is used to lookup variables.
|
Constructor | Description |
---|---|
StringSubstitutor(StringLookup variableResolver) |
Creates a new instance and initializes it.
|
StringSubstitutor(StringLookup variableResolver,
String prefix,
String suffix,
char escape) |
Creates a new instance and initializes it.
|
StringSubstitutor(StringLookup variableResolver,
String prefix,
String suffix,
char escape,
String valueDelimiter) |
Creates a new instance and initializes it.
|
StringSubstitutor(StringLookup variableResolver,
StringMatcher prefixMatcher,
StringMatcher suffixMatcher,
char escape) |
Creates a new instance and initializes it.
|
StringSubstitutor(StringLookup variableResolver,
StringMatcher prefixMatcher,
StringMatcher suffixMatcher,
char escape,
StringMatcher valueDelimiterMatcher) |
Creates a new instance and initializes it.
|
Modifier and Type | Method | Description |
---|---|---|
StringLookup |
StringLookupFactory.base64StringLookup() |
Returns the DateStringLookup singleton instance to format the current date with the format given in the key in a
format compatible with
SimpleDateFormat . |
StringLookup |
StringLookupFactory.constantStringLookup() |
Returns the ConstantStringLookup singleton instance to get the value of a fully-qualified static final value.
|
StringLookup |
StringLookupFactory.dateStringLookup() |
Returns the DateStringLookup singleton instance to format the current date with the format given in the key in a
format compatible with
SimpleDateFormat . |
StringLookup |
StringLookupFactory.environmentVariableStringLookup() |
Returns the EnvironmentVariableStringLookup singleton instance where the lookup key is an environment variable
name.
|
StringLookup |
StringLookupFactory.fileStringLookup() |
Returns the FileStringLookup singleton instance.
|
StringLookup |
StringLookupFactory.interpolatorStringLookup() |
Returns a new InterpolatorStringLookup.
|
StringLookup |
StringLookupFactory.interpolatorStringLookup(Map<String,StringLookup> stringLookupMap,
StringLookup defaultStringLookup,
boolean addDefaultLookups) |
Returns a new InterpolatorStringLookup.
|
<V> StringLookup |
StringLookupFactory.interpolatorStringLookup(Map<String,V> map) |
Returns a new InterpolatorStringLookup.
|
StringLookup |
StringLookupFactory.interpolatorStringLookup(StringLookup defaultStringLookup) |
Returns a new InterpolatorStringLookup.
|
StringLookup |
StringLookupFactory.javaPlatformStringLookup() |
Returns the JavaPlatformStringLookup singleton instance.
|
StringLookup |
StringLookupFactory.localHostStringLookup() |
Returns the LocalHostStringLookup singleton instance where the lookup key is one of:
name: for the local host name, for example
EXAMPLE .
canonical-name: for the local canonical host name, for example EXAMPLE.apache.org .
address: for the local host address, for example 192.168.56.1 .
|
<V> StringLookup |
StringLookupFactory.mapStringLookup(Map<String,V> map) |
Returns a new map-based lookup where the request for a lookup is answered with the value for that key.
|
StringLookup |
StringLookupFactory.nullStringLookup() |
Returns the NullStringLookup singleton instance which always returns null.
|
StringLookup |
StringLookupFactory.propertiesStringLookup() |
Returns the PropertiesStringLookup singleton instance.
|
StringLookup |
StringLookupFactory.resourceBundleStringLookup() |
Returns the ResourceBundleStringLookup singleton instance.
|
StringLookup |
StringLookupFactory.resourceBundleStringLookup(String bundleName) |
Returns a ResourceBundleStringLookup instance for the given bundle name.
|
StringLookup |
StringLookupFactory.scriptStringLookup() |
Returns the ScriptStringLookup singleton instance.
|
StringLookup |
StringLookupFactory.systemPropertyStringLookup() |
Returns the SystemPropertyStringLookup singleton instance where the lookup key is a system property name.
|
StringLookup |
StringLookupFactory.urlStringLookup() |
Returns the UrlStringLookup singleton instance.
|
StringLookup |
StringLookupFactory.xmlStringLookup() |
Returns the XmlStringLookup singleton instance.
|
Modifier and Type | Method | Description |
---|---|---|
StringLookup |
StringLookupFactory.interpolatorStringLookup(Map<String,StringLookup> stringLookupMap,
StringLookup defaultStringLookup,
boolean addDefaultLookups) |
Returns a new InterpolatorStringLookup.
|
StringLookup |
StringLookupFactory.interpolatorStringLookup(StringLookup defaultStringLookup) |
Returns a new InterpolatorStringLookup.
|
Modifier and Type | Method | Description |
---|---|---|
void |
StringLookupFactory.addDefaultStringLookups(Map<String,StringLookup> stringLookupMap) |
The following lookups are installed:
"sys" for the
SystemPropertyStringLookup .
"env" for the EnvironmentVariableStringLookup .
"java" for the JavaPlatformStringLookup .
"date" for the DateStringLookup .
"localhost" for the LocalHostStringLookup since 1.3.
"xml" for the XmlStringLookup since 1.5.
"properties" for the PropertiesStringLookup since 1.5.
"script" for the ScriptStringLookup since 1.5.
"file" for the FileStringLookup since 1.5.
"url" for the UrlStringLookup since 1.5.
"base64" for the Base64StringLookup since 1.5.
"urlEncode" for the UrlEncoderStringLookup since 1.5.
"urlDecode" for the UrlDecoderStringLookup since 1.5.
"const" for the ConstantStringLookup since 1.5.
|
StringLookup |
StringLookupFactory.interpolatorStringLookup(Map<String,StringLookup> stringLookupMap,
StringLookup defaultStringLookup,
boolean addDefaultLookups) |
Returns a new InterpolatorStringLookup.
|
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.