|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.taskdefs.condition.Matches
public class Matches
Simple regular expression condition.
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
Matches()
|
Method Summary | |
---|---|
void |
addRegexp(RegularExpression regularExpression)
A regular expression. |
boolean |
eval()
Is this condition true? |
void |
setCasesensitive(boolean b)
Whether to ignore case or not. |
void |
setMultiline(boolean b)
Whether to match should be multiline. |
void |
setPattern(java.lang.String pattern)
Set the regular expression to match against |
void |
setSingleLine(boolean b)
Whether to treat input as singleline ('.' matches newline). |
void |
setString(java.lang.String string)
Set the string |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Matches()
Method Detail |
---|
public void setString(java.lang.String string)
string
- the string to matchpublic void setPattern(java.lang.String pattern)
pattern
- the regular expression patternpublic void addRegexp(RegularExpression regularExpression)
regularExpression
- the regular expression object
to be configured as an elementpublic void setCasesensitive(boolean b)
b
- if false, ignore case.public void setMultiline(boolean b)
b
- the value to set.public void setSingleLine(boolean b)
b
- the value to set.public boolean eval() throws BuildException
Condition
eval
in interface Condition
BuildException
- if the attributes are not set correctly
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |