Class Substitution

All Implemented Interfaces:
Cloneable

public class Substitution extends DataType
A regular expression substitution datatype. It is an expression that is meant to replace a regular expression.
   <substitution [ [id="id"] expression="expression" | refid="id" ]
   />
 
See Also:
  • Perl5Substitution
  • Field Details

  • Constructor Details

    • Substitution

      public Substitution()
      Constructor for Substitution.
  • Method Details

    • setExpression

      public void setExpression(String expression)
      Set the pattern string for this regular expression substitution.
      Parameters:
      expression - the regular expression to use
    • getExpression

      public String getExpression(Project p)
      Gets the pattern string for this RegularExpression in the given project.
      Parameters:
      p - the project to look for the regular expression if this object is a reference
      Returns:
      the pattern string
    • getRef

      public Substitution getRef(Project p)
      Get the RegularExpression this reference refers to in the given project. Check for circular references too.
      Parameters:
      p - the project to look for the regular expression reference
      Returns:
      the resolved reference