1 /* |
|
2 * Copyright (c) 2004, Oracle and/or its affiliates. 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. Oracle designates this |
|
8 * particular file as subject to the "Classpath" exception as provided |
|
9 * by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 * or visit www.oracle.com if you need additional information or have any |
|
23 * 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 |
|
71 /** |
|
72 * Visits a type declaration. |
|
73 * @param d the declaration to visit |
|
74 */ |
|
75 public void visitTypeDeclaration(TypeDeclaration d); |
|
76 |
|
77 /** |
|
78 * Visits a class declaration. |
|
79 * @param d the declaration to visit |
|
80 */ |
|
81 public void visitClassDeclaration(ClassDeclaration d); |
|
82 |
|
83 /** |
|
84 * Visits an enum declaration. |
|
85 * @param d the declaration to visit |
|
86 */ |
|
87 public void visitEnumDeclaration(EnumDeclaration d); |
|
88 |
|
89 /** |
|
90 * Visits an interface declaration. |
|
91 * @param d the declaration to visit |
|
92 */ |
|
93 public void visitInterfaceDeclaration(InterfaceDeclaration d); |
|
94 |
|
95 /** |
|
96 * Visits an annotation type declaration. |
|
97 * @param d the declaration to visit |
|
98 */ |
|
99 public void visitAnnotationTypeDeclaration(AnnotationTypeDeclaration d); |
|
100 |
|
101 /** |
|
102 * Visits a field declaration. |
|
103 * @param d the declaration to visit |
|
104 */ |
|
105 public void visitFieldDeclaration(FieldDeclaration d); |
|
106 |
|
107 /** |
|
108 * Visits an enum constant declaration. |
|
109 * @param d the declaration to visit |
|
110 */ |
|
111 public void visitEnumConstantDeclaration(EnumConstantDeclaration d); |
|
112 |
|
113 /** |
|
114 * Visits a method or constructor declaration. |
|
115 * @param d the declaration to visit |
|
116 */ |
|
117 public void visitExecutableDeclaration(ExecutableDeclaration d); |
|
118 |
|
119 /** |
|
120 * Visits a constructor declaration. |
|
121 * @param d the declaration to visit |
|
122 */ |
|
123 public void visitConstructorDeclaration(ConstructorDeclaration d); |
|
124 |
|
125 /** |
|
126 * Visits a method declaration. |
|
127 * @param d the declaration to visit |
|
128 */ |
|
129 public void visitMethodDeclaration(MethodDeclaration d); |
|
130 |
|
131 /** |
|
132 * Visits an annotation type element declaration. |
|
133 * @param d the declaration to visit |
|
134 */ |
|
135 public void visitAnnotationTypeElementDeclaration( |
|
136 AnnotationTypeElementDeclaration d); |
|
137 |
|
138 /** |
|
139 * Visits a parameter declaration. |
|
140 * @param d the declaration to visit |
|
141 */ |
|
142 public void visitParameterDeclaration(ParameterDeclaration d); |
|
143 |
|
144 /** |
|
145 * Visits a type parameter declaration. |
|
146 * @param d the declaration to visit |
|
147 */ |
|
148 public void visitTypeParameterDeclaration(TypeParameterDeclaration d); |
|
149 } |
|