Class ScriptStringLookup
java.lang.Object
org.apache.commons.text.lookup.AbstractStringLookup
org.apache.commons.text.lookup.ScriptStringLookup
- All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>, StringLookup
Executes the script with the given engine name.
Execute the script with the engine name in the format "EngineName:Script".
For example: "javascript:3 + 4".
Using a StringSubstitutor:
StringSubstitutor.createInterpolator().replace("${script:javascript:3 + 4}"));
Public access is through StringLookupFactory.
- Since:
- 1.5
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ScriptStringLookupDefines the singleton for this class.Fields inherited from class AbstractStringLookup
SPLIT_CH, SPLIT_STR -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractStringLookup
substringAfter, substringAfter, substringAfterLast, toLookupKey, toLookupKeyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface StringLookup
apply
-
Field Details
-
INSTANCE
Defines the singleton for this class.
-
-
Constructor Details
-
ScriptStringLookup
private ScriptStringLookup()No need to build instances for now.
-
-
Method Details
-
lookup
-