|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.util.VisitableBase
public abstract class VisitableBase
Implements Visitable contract. Subclasses shall implement visitChildren() method.
Constructor Summary | |
---|---|
VisitableBase()
|
Method Summary | |
---|---|
boolean |
accept(Visitor visitor)
|
protected void |
acceptChildren(Visitor visitor)
Override this method to navigate visitor through object constituents. |
static Searchable |
convert2searchable(java.lang.Object object)
Wraps object into instance of Searchable |
java.lang.Object |
find(Acceptor acceptor)
|
java.util.Collection |
findAll(Acceptor acceptor)
|
static void |
object2visitor(java.lang.Object target,
Visitor visitor)
Properly handles passing visitor to a child - takes into account that child is visitable and visitor may be an instance of PoliteVisitor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VisitableBase()
Method Detail |
---|
public boolean accept(Visitor visitor)
accept
in interface Visitable
public java.lang.Object find(Acceptor acceptor)
find
in interface Searchable
public java.util.Collection findAll(Acceptor acceptor)
findAll
in interface Searchable
protected void acceptChildren(Visitor visitor)
visitor
- public static void object2visitor(java.lang.Object target, Visitor visitor)
target
- Object to be visited by the visitor.visitor
- child
- public static Searchable convert2searchable(java.lang.Object object)
visitor
- child
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |