|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttom.library.sl.AbstractStrategy
tom.library.sl.Fail
public class Fail
x.accept(Fail) always raises a VisitFailure exception.
Basic visitor combinator without arguments, that always fails.
Test case documentation: FailTest
| Field Summary |
|---|
| Fields inherited from class tom.library.sl.AbstractStrategy |
|---|
environment, visitors |
| Constructor Summary | |
|---|---|
Fail()
Construct Fail combinator with empty failure message. |
|
Fail(java.lang.String message)
Construct Fail combinator with a failure message to be passed to the VisitFailure that it throws. |
|
| Method Summary | |
|---|---|
int |
visit()
Visits the current subject (found in the environment) and place its result in the environment. |
Visitable |
visitLight(Visitable any)
Visits the subject any in a light way (without environment) |
| Methods inherited from class tom.library.sl.AbstractStrategy |
|---|
accept, getChildAt, getChildCount, getChildren, getEnvironment, getRoot, getSubject, init, init, initSubterm, initSubterm, initSubterm, initSubterm, initSubterm, setChildAt, setChildren, setEnvironment, setRoot, setSubject, visit, visit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Fail()
public Fail(java.lang.String message)
| Method Detail |
|---|
public Visitable visitLight(Visitable any)
throws VisitFailure
Strategy
any - the subject to visit.
VisitFailure - in case of failure.public int visit()
Strategy
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||