public interface Visitor
All visitor classes should implement this interface.
Methods to visit a given type of node must obey the following conditions:
public;ParseNode;Subscribevoid.For instance:
public final class MyVisitor
implements Visitor
{
@Subscribe
public void visitBaseNode(final BaseNode node)
{
// code
}
@Subscribe
public void visitSubclassNode(final SubclassNode node)
{
// code
}
// etc
}
Important note: if your nodes subclass each other, be
aware that all @Subscribe methods whose argument is either of the
exact class or any superclass of that node will be called. Depending
on the situation, this may be either desirable or undesirable.