com.iotabits.revisitor
Class BasicVisitable

java.lang.Object
  extended bycom.iotabits.revisitor.BasicVisitable
All Implemented Interfaces:
iVisitable
Direct Known Subclasses:
BinaryTreeNode, GraphNode

public class BasicVisitable
extends java.lang.Object
implements iVisitable

This is simplest and default implementation of the iVisitable interface.


Constructor Summary
BasicVisitable()
           
 
Method Summary
 void accept(iReflectiveVisitor visitor)
          Dispatches this object to the revisitor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicVisitable

public BasicVisitable()
Method Detail

accept

public void accept(iReflectiveVisitor visitor)
            throws java.lang.Exception
Dispatches this object to the revisitor.

In the reflective idiom we just call revisitor.dispatchToVisit().

Specified by:
accept in interface iVisitable
Parameters:
visitor - The object doing the visiting.
Throws:
java.lang.Exception - When there is not method found.