foundry.stringutils
Interface Interpolator
- All Known Implementing Classes:
- SimpleInterpolator
- public interface Interpolator
Implementors of this interface are capable of substituting values
for tokens delimited by certain characters. For example, one implementor
might substitute a token that looks like this:
${user.name}
...with a value drawn from the System
properties:
ljnelson
In this case, the delimiter that identifies the start of a String
to be interpolated is "${
" and the delimiter
that identifies the end of a String
to be interpolated is
"}
".
Implementors must ensure that the interpolate(java.lang.String)
method
calls the getValueForToken(String)
method at appropriate
points.
- Version:
- $Revision$
- Author:
- Laird Nelson
interpolate
public String interpolate(String source)
throws StringUtilsException
getValueForToken
public String getValueForToken(String token)
throws StringUtilsException
getTokenStartDelimiter
public String getTokenStartDelimiter()
throws StringUtilsException
getTokenEndDelimiter
public String getTokenEndDelimiter()
throws StringUtilsException
Copyright © 2000 - Laird Jarrett Nelson