FileDocCategorySizeDatePackage
Substitution.javaAPI DocApache Ant 1.702472Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.types

Substitution

public class Substitution extends DataType
A regular expression substitution datatype. It is an expression that is meant to replace a regular expression.
<substitition [ [id="id"] expression="expression" | refid="id" ]
/>
see
org.apache.oro.text.regex.Perl5Substitution

Fields Summary
public static final String
DATA_TYPE_NAME
The name of this data type
private String
expression
Constructors Summary
public Substitution()
Constructor for Substitution.


        
      
        this.expression = null;
    
Methods Summary
public java.lang.StringgetExpression(org.apache.tools.ant.Project p)
Gets the pattern string for this RegularExpression in the given project.

param
p the project to look for the regular expression if this object is a reference
return
the pattern string

        if (isReference()) {
            return getRef(p).getExpression(p);
        }

        return expression;
    
public org.apache.tools.ant.types.SubstitutiongetRef(org.apache.tools.ant.Project p)
Get the RegularExpression this reference refers to in the given project. Check for circular references too.

param
p the project to look for the regular expression reference
return
the resolved reference

        return (Substitution) getCheckedRef(p);
    
public voidsetExpression(java.lang.String expression)
Set the pattern string for this regular expression substitution.

param
expression the regular expression to use

        this.expression = expression;