org.reflext.api.visit
Class HierarchyVisitorStrategy<V extends HierarchyVisitor<V>>

java.lang.Object
  extended by org.reflext.api.visit.HierarchyVisitorStrategy<V>
All Implemented Interfaces:
VisitorStrategy<V,HierarchyVisitorStrategy<V>>

public abstract class HierarchyVisitorStrategy<V extends HierarchyVisitor<V>>
extends java.lang.Object
implements VisitorStrategy<V,HierarchyVisitorStrategy<V>>

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
HierarchyVisitorStrategy()
           
 
Method Summary
protected  boolean accept(ClassTypeInfo type)
          Controls wether or not a type will be visited.
protected  void leave(ClassTypeInfo type)
          Signals that a type has been visited.
 void visit(TypeInfo type, V visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchyVisitorStrategy

public HierarchyVisitorStrategy()
Method Detail

visit

public final void visit(TypeInfo type,
                        V visitor)
Specified by:
visit in interface VisitorStrategy<V extends HierarchyVisitor<V>,HierarchyVisitorStrategy<V extends HierarchyVisitor<V>>>

accept

protected boolean accept(ClassTypeInfo type)
Controls wether or not a type will be visited. The method implementation returns true and can be overriden.

Parameters:
type - the type to accept or refuse
Returns:
true if the type should be visited

leave

protected void leave(ClassTypeInfo type)
Signals that a type has been visited. This method will only be called for types which have been accepted by the accept(org.reflext.api.ClassTypeInfo) method. The default implementation has an empty body.

Parameters:
type - the visited type


Copyright © 2010 eXo Platform SAS. All Rights Reserved.