1 /*
   2  * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Sun designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Sun in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  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 
  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
  72      */
  73     public void visitVoidType(VoidType t);
  74 
  75     /**
  76      * Visits a reference type.
  77      *
  78      * @param t the type to visit
  79      */
  80     public void visitReferenceType(ReferenceType t);
  81 
  82     /**
  83      * Visits a declared type.
  84      *
  85      * @param t the type to visit
  86      */
  87     public void visitDeclaredType(DeclaredType t);
  88 
  89     /**
  90      * Visits a class type.
  91      *
  92      * @param t the type to visit
  93      */
  94     public void visitClassType(ClassType t);
  95 
  96     /**
  97      * Visits an enum type.
  98      *
  99      * @param t the type to visit
 100      */
 101     public void visitEnumType(EnumType t);
 102 
 103     /**
 104      * Visits an interface type.
 105      *
 106      * @param t the type to visit
 107      */
 108     public void visitInterfaceType(InterfaceType t);
 109 
 110     /**
 111      * Visits an annotation type.
 112      *
 113      * @param t the type to visit
 114      */
 115     public void visitAnnotationType(AnnotationType t);
 116 
 117     /**
 118      * Visits an array type.
 119      *
 120      * @param t the type to visit
 121      */
 122     public void visitArrayType(ArrayType t);
 123 
 124     /**
 125      * Visits a type variable.
 126      *
 127      * @param t the type to visit
 128      */
 129     public void visitTypeVariable(TypeVariable t);
 130 
 131     /**
 132      * Visits a wildcard.
 133      *
 134      * @param t the type to visit
 135      */
 136     public void visitWildcardType(WildcardType t);
 137 }