src/share/classes/com/sun/mirror/util/DeclarationVisitor.java

Print this page




  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.util;
  27 
  28 import com.sun.mirror.declaration.*;
  29 
  30 
  31 /**
  32  * A visitor for declarations, in the style of the standard visitor
  33  * design pattern.  Classes implementing this interface are used to
  34  * operate on a declaration when the kind of declaration is unknown at
  35  * compile time.  When a visitor is passed to a declaration's {@link
  36  * Declaration#accept accept} method, the most specific
  37  * <tt>visit<i>Xxx</i></tt> method applicable to that declaration is
  38  * invoked.
  39  *





  40  * @author Joseph D. Darcy
  41  * @author Scott Seligman
  42  * @since 1.5
  43  */
  44 

  45 public interface DeclarationVisitor {
  46 
  47     /**
  48      * Visits a declaration.
  49      * @param d the declaration to visit
  50      */
  51     public void visitDeclaration(Declaration d);
  52 
  53     /**
  54      * Visits a package declaration.
  55      * @param d the declaration to visit
  56      */
  57     public void visitPackageDeclaration(PackageDeclaration d);
  58 
  59     /**
  60      * Visits a member or constructor declaration.
  61      * @param d the declaration to visit
  62      */
  63     public void visitMemberDeclaration(MemberDeclaration d);
  64 




  20  *
  21  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  22  * CA 95054 USA or visit www.sun.com if you need additional information or
  23  * have any questions.
  24  */
  25 
  26 package com.sun.mirror.util;
  27 
  28 import com.sun.mirror.declaration.*;
  29 
  30 
  31 /**
  32  * A visitor for declarations, in the style of the standard visitor
  33  * design pattern.  Classes implementing this interface are used to
  34  * operate on a declaration when the kind of declaration is unknown at
  35  * compile time.  When a visitor is passed to a declaration's {@link
  36  * Declaration#accept accept} method, the most specific
  37  * <tt>visit<i>Xxx</i></tt> method applicable to that declaration is
  38  * invoked.
  39  *
  40  * @deprecated All components of this API have been superseded by the
  41  * standardized annotation processing API.  The replacement for the
  42  * functionality of this interface is {@link
  43  * javax.lang.model.element.ElementVisitor}.
  44  *
  45  * @author Joseph D. Darcy
  46  * @author Scott Seligman
  47  * @since 1.5
  48  */
  49 @Deprecated
  50 @SuppressWarnings("deprecation")
  51 public interface DeclarationVisitor {
  52 
  53     /**
  54      * Visits a declaration.
  55      * @param d the declaration to visit
  56      */
  57     public void visitDeclaration(Declaration d);
  58 
  59     /**
  60      * Visits a package declaration.
  61      * @param d the declaration to visit
  62      */
  63     public void visitPackageDeclaration(PackageDeclaration d);
  64 
  65     /**
  66      * Visits a member or constructor declaration.
  67      * @param d the declaration to visit
  68      */
  69     public void visitMemberDeclaration(MemberDeclaration d);
  70