org.jurvis.patterns
Class JvReflectiveVisitor

java.lang.Object
  extended by org.jurvis.patterns.JvReflectiveVisitor
All Implemented Interfaces:
JvVisitor

public abstract class JvReflectiveVisitor
extends Object
implements JvVisitor

An abstract JvVisitor that uses reflection to find a method specific for visiting the type of each visited object.


Constructor Summary
JvReflectiveVisitor()
           
 
Method Summary
protected abstract  void defaultVisit(Object o)
           
 void visit(Object o)
          Visit the specified object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JvReflectiveVisitor

public JvReflectiveVisitor()
Method Detail

defaultVisit

protected abstract void defaultVisit(Object o)

visit

public void visit(Object o)
Visit the specified object. Uses reflection to try to find a method specific for visiting the type of the object. Rather primitive.

Specified by:
visit in interface JvVisitor
Parameters:
o - the object to visit


Copyright © 1999-2004 Neil W. Weber. All Rights Reserved.