com.stevesoft.pat
Class ChangeRule

java.lang.Object
  |
  +--com.stevesoft.pat.ReplaceRule
        |
        +--com.stevesoft.pat.SpecialRule
              |
              +--com.stevesoft.pat.ChangeRule

public class ChangeRule
extends SpecialRule

This class implements user defined special replacement rules of the form ${=name}. See trans2.java and trans2a.java.


Fields inherited from class com.stevesoft.pat.ReplaceRule
next
 
Constructor Summary
ChangeRule(ChangeRule c)
           
ChangeRule(java.lang.String nm, Regex rr)
           
ChangeRule(java.lang.String nm, Transformer tr)
           

 
Method Summary
 void apply(StringBufferLike sb, RegRes rr)
          This function appends to the StringBufferLike the text you want to replaced the portion of the String last matched.
 java.lang.Object clone1()
          A rule describing how to clone only the current ReplaceRule, and none of the others in this linked list.
 java.lang.String toString1()
          This tells how to convert just the current element (and none of the other items in the linked list) to a String.
 
Methods inherited from class com.stevesoft.pat.ReplaceRule
add, addRule, arg, clone, define, define, define, isDefined, perlCode, toString, undefine
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChangeRule

public ChangeRule(ChangeRule c)

ChangeRule

public ChangeRule(java.lang.String nm,
                  Regex rr)

ChangeRule

public ChangeRule(java.lang.String nm,
                  Transformer tr)
Method Detail

clone1

public java.lang.Object clone1()
Description copied from class: ReplaceRule
A rule describing how to clone only the current ReplaceRule, and none of the others in this linked list. It is called by clone() for each item in the list.
Overrides:
clone1 in class ReplaceRule

toString1

public java.lang.String toString1()
Description copied from class: ReplaceRule
This tells how to convert just the current element (and none of the other items in the linked list) to a String. This method is called by toString() for each item in the linked list.
Overrides:
toString1 in class ReplaceRule

apply

public void apply(StringBufferLike sb,
                  RegRes rr)
Description copied from class: ReplaceRule
This function appends to the StringBufferLike the text you want to replaced the portion of the String last matched.
Overrides:
apply in class SpecialRule