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

Print this page




  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 
  29 import com.sun.mirror.type.*;
  30 
  31 
  32 /**
  33  * A visitor for types, in the style of the standard visitor design pattern.
  34  * This is used to operate on a type when the kind
  35  * of type is unknown at compile time.
  36  * When a visitor is passed to a type's
  37  * {@link TypeMirror#accept accept} method,
  38  * the most specific <tt>visit<i>Xxx</i></tt> method applicable to
  39  * that type is invoked.
  40  *





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

  46 public interface TypeVisitor {
  47 
  48     /**
  49      * Visits a type mirror.
  50      *
  51      * @param t the type to visit
  52      */
  53     public void visitTypeMirror(TypeMirror t);
  54 
  55     /**
  56      * Visits a primitive type.
  57 
  58      * @param t the type to visit
  59      */
  60     public void visitPrimitiveType(PrimitiveType t);
  61 
  62     /**
  63      * Visits a void type.
  64      *
  65      * @param t the type to visit




  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 
  29 import com.sun.mirror.type.*;
  30 
  31 
  32 /**
  33  * A visitor for types, in the style of the standard visitor design pattern.
  34  * This is used to operate on a type when the kind
  35  * of type is unknown at compile time.
  36  * When a visitor is passed to a type's
  37  * {@link TypeMirror#accept accept} method,
  38  * the most specific <tt>visit<i>Xxx</i></tt> method applicable to
  39  * that type is invoked.
  40  *
  41  * @deprecated All components of this API have been superseded by the
  42  * standardized annotation processing API.  The replacement for the
  43  * functionality of this interface is {@link
  44  * javax.lang.model.element.TypeVisitor}.
  45  *
  46  * @author Joseph D. Darcy
  47  * @author Scott Seligman
  48  * @since 1.5
  49  */
  50 @Deprecated
  51 @SuppressWarnings("deprecation")
  52 public interface TypeVisitor {
  53 
  54     /**
  55      * Visits a type mirror.
  56      *
  57      * @param t the type to visit
  58      */
  59     public void visitTypeMirror(TypeMirror t);
  60 
  61     /**
  62      * Visits a primitive type.
  63 
  64      * @param t the type to visit
  65      */
  66     public void visitPrimitiveType(PrimitiveType t);
  67 
  68     /**
  69      * Visits a void type.
  70      *
  71      * @param t the type to visit