org.schmant.support.text
Interface ReplacementTextStrategy

All Known Implementing Classes:
CapturingGroupAwareStringTextStrategy, ClosureReplacementTextStrategy, PropertyValueTextStrategy, StringTextStrategy

public interface ReplacementTextStrategy

This interface is implemented by classes that can be used to replace text.

Implementations should not contain any mutable internal state since object instances may be used several times, possibly simultaneously by different threads.

Since:
0.5
Author:
Karl Gustafsson

Method Summary
 String getReplace(String text, Matcher m)
          Get the replacement text for the supplied text.
 

Method Detail

getReplace

String getReplace(String text,
                  Matcher m)
Get the replacement text for the supplied text.

Parameters:
text - The text.
m - The Matcher that matches the current text. This object can only be read from. Its state must not be updated.
Returns:
The replacement text.