org.chromattic.apt
Class TypeHierarchyVisitor

java.lang.Object
  extended by org.chromattic.apt.TypeHierarchyVisitor

public class TypeHierarchyVisitor
extends java.lang.Object

Visitor pattern for a java class/interface type hierarchy. The visitor strategy for a specified type is recursive

  1. Invoke the method enter(Class) with the type. When the method returns false it ends the visit.
  2. Continue the visit recursively on the type superclass when it does have one.
  3. Continue the visit recursively on each implemented interfaces.
  4. Invoke the method leave(Class) to signal that visit of the type is terminated.

Version:
$Revision$
Author:
Julien Viet

Constructor Summary
TypeHierarchyVisitor()
           
 
Method Summary
 void accept(java.lang.Class type)
           
protected  boolean enter(java.lang.Class type)
          Subclass to control the visitor.
protected  void leave(java.lang.Class type)
          Signal that the visit of the type is terminated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeHierarchyVisitor

public TypeHierarchyVisitor()
Method Detail

accept

public void accept(java.lang.Class type)

enter

protected boolean enter(java.lang.Class type)
Subclass to control the visitor.

Parameters:
type - the visited type
Returns:
true if the type shall be visited

leave

protected void leave(java.lang.Class type)
Signal that the visit of the type is terminated.

Parameters:
type - the type


Copyright © 2011 eXo Platform SAS. All Rights Reserved.