public abstract class AbstractVisitable extends java.lang.Object implements Visitable
Visitable
classes.Constructor and Description |
---|
AbstractVisitable() |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Provides each value of this container to the provided
Visitor . |
protected abstract void |
doAccept(Visitor visitor)
Provides each value of this container to the provided
Visitor . |
public final void accept(Visitor visitor) throws BaseException
Visitable
Visitor
.accept
in interface Visitable
visitor
- the visitor to apply to each value.BaseException
- if there is an error while performing the visitprotected abstract void doAccept(Visitor visitor) throws VisitCanceledException, BaseException
Visitor
.
The VisitCanceledException
will be managed by the parent
AbstractVisitable
class, so simply throw it.VisitCanceledException
BaseException