|
|||||||||||
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.Task | +--org.apache.anteater.test.BaseTask | +--org.apache.anteater.test.MatcherSet
MatcherSet
maintains a set of Matcher
s to
be applied on an object.
When the MatcherSet
is execute
d, the
Matcher
elements are applied in order on the matched
object. The matching stops when the first set of tests specified by
a Matcher
succeed. In this case the result of the
MatcherSet
is true. If no Matcher
object
matches, the result of the MatcherSet
is false.
MatcherSet's "lifecycle" consists of having the following methods called:
setObjectModel(java.util.Map)
setMatchOn(java.lang.Object)
BaseTask.setDebug(int)
setLogger(org.apache.anteater.test.log.Logger)
execute()
getResult()
ActionTask.execute()
method is typically responsible for taking a
MatcherSet through it's lifecycle.
Owner of a MatcherSet.
,
Child element of a MatcherSet
Field Summary | |
protected Logger |
logger
|
protected ArrayList |
matchers
The list of Matcher instances. |
protected Object |
matchOn
The object to match on. |
protected Map |
objectModel
The object model obtained from this object's container (usually a Listener or an HttpRequest). |
protected boolean |
result
Whether all MatcherTests in this MatcherSet have passed or not. |
Fields inherited from class org.apache.anteater.test.BaseTask |
debug, debugWasSet |
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Fields inherited from interface org.apache.anteater.test.ObjectModel |
NAMESPACES_KEY, PROPERTIES_KEY |
Constructor Summary | |
MatcherSet()
Creates a new MatcherSet instance. |
Method Summary | |
void |
addMatcher(Matcher matcher)
|
void |
execute()
|
boolean |
getResult()
|
void |
setLogger(Logger logger)
|
void |
setMatchOn(Object matchOn)
|
void |
setObjectModel(Map objectModel)
Set the context in the receiving object. |
Methods inherited from class org.apache.anteater.test.BaseTask |
debug, getDebug, getGroup, print, println, resolveContentURL, setDebug, setGroup, setGroup |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean result
protected ArrayList matchers
Matcher
instances.
protected Object matchOn
protected Map objectModel
protected Logger logger
Constructor Detail |
public MatcherSet()
MatcherSet
instance.
Method Detail |
public void addMatcher(Matcher matcher)
public void setMatchOn(Object matchOn)
public boolean getResult()
public void setObjectModel(Map objectModel)
ObjectModel
setObjectModel
in interface ObjectModel
objectModel
- a HashMap
valuepublic void setLogger(Logger logger)
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |