Top Description Fields Constructors Methods
org.apache.tools.ant.types

public Class Substitution

extends DataType
Class Inheritance
Imports
org.apache.tools.ant.Project

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
org.apache.oro.text.regex.Perl5Substitution

Field Summary

Modifier and TypeField and Description
public static final String
DATA_TYPE_NAME

The name of this data type

private String
Inherited from org.apache.tools.ant.types.DataType:
checkedref

Constructor Summary

AccessConstructor and Description
public
Substitution()

Constructor for Substitution.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the pattern string
getExpression
(Project
the project to look for the regular expression if this object is a reference
p
)

Gets the pattern string for this RegularExpression in the given project.

public Substitution

Returns:

the resolved reference
getRef
(Project
the project to look for the regular expression reference
p
)

Get the RegularExpression this reference refers to in the given project.

public void
setExpression(String
the regular expression to use
expression
)

Set the pattern string for this regular expression substitution.

Inherited from org.apache.tools.ant.types.DataType:
checkAttributesAllowedcheckChildrenAllowedcircularReferenceclonedieOnCircularReferencedieOnCircularReferencedieOnCircularReferencegetCheckedRefgetCheckedRefgetCheckedRefgetCheckedRefgetCheckedRefgetDataTypeNamegetRefidinvokeCircularReferenceCheckisCheckedisReferencenoChildrenAllowedpushAndInvokeCircularReferenceChecksetCheckedsetRefidtooManyAttributestoString

Field Detail

DATA_TYPE_NAMEback to summary
public static final String DATA_TYPE_NAME

The name of this data type

expressionback to summary
private String expression

Constructor Detail

Substitutionback to summary
public Substitution()

Constructor for Substitution.

Method Detail

getExpressionback to summary
public String getExpression(Project p)

Gets the pattern string for this RegularExpression in the given project.

Parameters
p:Project

the project to look for the regular expression if this object is a reference

Returns:String

the pattern string

getRefback to summary
public Substitution getRef(Project p)

Get the RegularExpression this reference refers to in the given project. Check for circular references too.

Parameters
p:Project

the project to look for the regular expression reference

Returns:Substitution

the resolved reference

setExpressionback to summary
public void setExpression(String expression)

Set the pattern string for this regular expression substitution.

Parameters
expression:String

the regular expression to use