oss.net.pstream.rewrite
Class RewriteSubstitution

java.lang.Object
  |
  +--oss.net.pstream.rewrite.RewriteSubstitution
All Implemented Interfaces:
org.apache.oro.text.regex.Substitution

public class RewriteSubstitution
extends java.lang.Object
implements org.apache.oro.text.regex.Substitution

RewriteSubstitution implements a Substitution consisting of a simple literal string. This class is intended for use with Util.substitute.

Since:
1.1
Version:
@version@
Author:
Daniel F. Savarese
See Also:
Substitution, Util, Util#substitute, Substitution, Perl5Substitution

Constructor Summary
RewriteSubstitution(org.apache.oro.text.regex.MatchResult PreviousCondition, PortletStreamParameters Params, RewriteVariableResolver SubstitutionResolver)
          Creates a RewriteSubstitution representing the given string.
 
Method Summary
 void appendSubstitution(java.lang.StringBuffer appendBuffer, org.apache.oro.text.regex.MatchResult match, int substitutionCount, org.apache.oro.text.regex.PatternMatcherInput originalInput, org.apache.oro.text.regex.PatternMatcher matcher, org.apache.oro.text.regex.Pattern pattern)
          Appends the substitution to a buffer containing the original input with substitutions applied for the pattern matches found so far.
 java.lang.String getSubstitution(org.apache.oro.text.regex.MatchResult match)
          Returns the string substitution represented by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RewriteSubstitution

public RewriteSubstitution(org.apache.oro.text.regex.MatchResult PreviousCondition,
                           PortletStreamParameters Params,
                           RewriteVariableResolver SubstitutionResolver)
                    throws RewriteException
Creates a RewriteSubstitution representing the given string.

Method Detail

getSubstitution

public java.lang.String getSubstitution(org.apache.oro.text.regex.MatchResult match)
                                 throws RewriteException
Returns the string substitution represented by this object.

Returns:
The string substitution represented by this object.
RewriteException

appendSubstitution

public void appendSubstitution(java.lang.StringBuffer appendBuffer,
                               org.apache.oro.text.regex.MatchResult match,
                               int substitutionCount,
                               org.apache.oro.text.regex.PatternMatcherInput originalInput,
                               org.apache.oro.text.regex.PatternMatcher matcher,
                               org.apache.oro.text.regex.Pattern pattern)
Appends the substitution to a buffer containing the original input with substitutions applied for the pattern matches found so far. See Substitution.appendSubstition() for more details regarding the expected behavior of this method.

Specified by:
appendSubstitution in interface org.apache.oro.text.regex.Substitution
Parameters:
appendBuffer - The buffer containing the new string resulting from performing substitutions on the original input.
match - The current match causing a substitution to be made.
substitutionCount - The number of substitutions that have been performed so far by Util.substitute.
originalInput - The original input upon which the substitutions are being performed. This is a read-only parameter and is not modified.
matcher - The PatternMatcher used to find the current match.
pattern - The Pattern used to find the current match.


Copyright © 2000 Dummy Corp. All Rights Reserved.