|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Interpolator
Interpolator interface. Based on existing RegexBasedInterpolator interface.
Method Summary | |
---|---|
void |
addPostProcessor(InterpolationPostProcessor postProcessor)
Add a new post-processor to handle final processing after recursively-interpolated value is determined. |
void |
addValueSource(ValueSource valueSource)
Add a new ValueSource to the stack used to resolve expressions
in this interpolator instance. |
void |
clearAnswers()
|
void |
clearFeedback()
Clear the feedback messages from previous interpolate(..) calls. |
List |
getFeedback()
Return any feedback messages and errors that were generated - but suppressed - during the interpolation process. |
String |
interpolate(String input)
See interpolate(String, String, RecursionInterceptor) . |
String |
interpolate(String input,
RecursionInterceptor recursionInterceptor)
See interpolate(String, String, RecursionInterceptor) . |
String |
interpolate(String input,
String thisPrefixPattern)
See interpolate(String, String, RecursionInterceptor) . |
String |
interpolate(String input,
String thisPrefixPattern,
RecursionInterceptor recursionInterceptor)
Attempt to resolve all expressions in the given input string, using the given pattern to first trim an optional prefix from each expression. |
boolean |
isCacheAnswers()
|
void |
removePostProcessor(InterpolationPostProcessor postProcessor)
Remove the given post-processor. |
void |
removeValuesSource(ValueSource valueSource)
Remove the specified ValueSource from the stack used to resolve
expressions in this interpolator instance. |
void |
setCacheAnswers(boolean cacheAnswers)
|
Method Detail |
---|
void addValueSource(ValueSource valueSource)
ValueSource
to the stack used to resolve expressions
in this interpolator instance.
void removeValuesSource(ValueSource valueSource)
ValueSource
from the stack used to resolve
expressions in this interpolator instance.
void addPostProcessor(InterpolationPostProcessor postProcessor)
void removePostProcessor(InterpolationPostProcessor postProcessor)
String interpolate(String input, String thisPrefixPattern) throws InterpolationException
interpolate(String, String, RecursionInterceptor)
.
SimpleRecursionInterceptor
instance for protection against expression cycles.
input
- The input string to interpolatethisPrefixPattern
- An optional pattern that should be trimmed from
the start of any expressions found in the input.
InterpolationException
String interpolate(String input, String thisPrefixPattern, RecursionInterceptor recursionInterceptor) throws InterpolationException
input
- The input string to interpolatethisPrefixPattern
- An optional pattern that should be trimmed from
the start of any expressions found in the input.recursionInterceptor
- Used to protect the interpolation process
from expression cycles, and throw an
exception if one is detected.
InterpolationException
String interpolate(String input) throws InterpolationException
interpolate(String, String, RecursionInterceptor)
.
SimpleRecursionInterceptor
instance for protection against expression cycles. It also leaves empty the
expression prefix which would otherwise be trimmed from expressions. The
result is that any detected expression will be resolved as-is.
input
- The input string to interpolate
InterpolationException
String interpolate(String input, RecursionInterceptor recursionInterceptor) throws InterpolationException
interpolate(String, String, RecursionInterceptor)
.
input
- The input string to interpolaterecursionInterceptor
- Used to protect the interpolation process
from expression cycles, and throw an
exception if one is detected.
InterpolationException
List getFeedback()
List
that may be interspersed with String
and
Throwable
instances.void clearFeedback()
boolean isCacheAnswers()
void setCacheAnswers(boolean cacheAnswers)
void clearAnswers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |