com.basecmp.core.util
Class ConstantReplaceTransformer

java.lang.Object
  extended bycom.basecmp.core.util.ReplaceTransformer
      extended bycom.basecmp.core.util.ConstantReplaceTransformer

public class ConstantReplaceTransformer
extends ReplaceTransformer

Transformer implementation that effectivley executes a replaceAll with the replacement for occurence of the regular expression on the toString()-version of input-object. Created on 14.05.2006

Author:
Wolfgang Schröder

Constructor Summary
ConstantReplaceTransformer(java.lang.String regex, java.lang.String replacement)
          Mainconstructor.
 
Method Summary
 java.lang.String getReplacement(java.lang.String[] matchingGroups)
          Delivers always the replacement given at instantiation.
 
Methods inherited from class com.basecmp.core.util.ReplaceTransformer
transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantReplaceTransformer

public ConstantReplaceTransformer(java.lang.String regex,
                                  java.lang.String replacement)
Mainconstructor.

Parameters:
regex - The regular expression (JDK-style) which is used by the transformation.
replacement - The replacement used for each match of the regular expresison.
Method Detail

getReplacement

public java.lang.String getReplacement(java.lang.String[] matchingGroups)
Delivers always the replacement given at instantiation.

Specified by:
getReplacement in class ReplaceTransformer


Copyright © 2004 by basecmp® - Professional Web Solutions