9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.bcel.internal.classfile;
23
24 /**
25 * Interface to make use of the Visitor pattern programming style. I.e. a class
26 * that implements this interface can traverse the contents of a Java class just
27 * by calling the `accept' method which all classes have.
28 *
29 * @version $Id$
30 */
31 public interface Visitor
32 {
33 void visitCode(Code obj);
34
35 void visitCodeException(CodeException obj);
36
37 void visitConstantClass(ConstantClass obj);
38
39 void visitConstantDouble(ConstantDouble obj);
40
41 void visitConstantFieldref(ConstantFieldref obj);
42
43 void visitConstantFloat(ConstantFloat obj);
44
45 void visitConstantInteger(ConstantInteger obj);
46
47 void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);
48
49 void visitConstantInvokeDynamic(ConstantInvokeDynamic obj);
120 * @since 6.0
121 */
122 void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
123
124 /**
125 * @since 6.0
126 */
127 void visitEnclosingMethod(EnclosingMethod obj);
128
129 /**
130 * @since 6.0
131 */
132 void visitBootstrapMethods(BootstrapMethods obj);
133
134 /**
135 * @since 6.0
136 */
137 void visitMethodParameters(MethodParameters obj);
138
139 /**
140 * @since 6.0
141 */
142 void visitConstantMethodType(ConstantMethodType obj);
143
144 /**
145 * @since 6.0
146 */
147 void visitConstantMethodHandle(ConstantMethodHandle obj);
148
149 /**
150 * @since 6.0
151 */
152 void visitParameterAnnotationEntry(ParameterAnnotationEntry obj);
153
154 /**
155 * @since 6.1
156 */
157 void visitConstantPackage(ConstantPackage constantPackage);
158
159 /**
160 * @since 6.1
161 */
162 void visitConstantModule(ConstantModule constantModule);
163
164 /**
165 * @since 6.3
166 */
167 default void visitConstantDynamic(ConstantDynamic constantDynamic) {
168 // empty
169 }
170 }
|
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.bcel.internal.classfile;
23
24 /**
25 * Interface to make use of the Visitor pattern programming style. I.e. a class
26 * that implements this interface can traverse the contents of a Java class just
27 * by calling the `accept' method which all classes have.
28 *
29 */
30 public interface Visitor
31 {
32 void visitCode(Code obj);
33
34 void visitCodeException(CodeException obj);
35
36 void visitConstantClass(ConstantClass obj);
37
38 void visitConstantDouble(ConstantDouble obj);
39
40 void visitConstantFieldref(ConstantFieldref obj);
41
42 void visitConstantFloat(ConstantFloat obj);
43
44 void visitConstantInteger(ConstantInteger obj);
45
46 void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);
47
48 void visitConstantInvokeDynamic(ConstantInvokeDynamic obj);
119 * @since 6.0
120 */
121 void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
122
123 /**
124 * @since 6.0
125 */
126 void visitEnclosingMethod(EnclosingMethod obj);
127
128 /**
129 * @since 6.0
130 */
131 void visitBootstrapMethods(BootstrapMethods obj);
132
133 /**
134 * @since 6.0
135 */
136 void visitMethodParameters(MethodParameters obj);
137
138 /**
139 * @since 6.4.0
140 */
141 default void visitMethodParameter(final MethodParameter obj) {
142 // empty
143 }
144
145 /**
146 * @since 6.0
147 */
148 void visitConstantMethodType(ConstantMethodType obj);
149
150 /**
151 * @since 6.0
152 */
153 void visitConstantMethodHandle(ConstantMethodHandle obj);
154
155 /**
156 * @since 6.0
157 */
158 void visitParameterAnnotationEntry(ParameterAnnotationEntry obj);
159
160 /**
161 * @since 6.1
162 */
163 void visitConstantPackage(ConstantPackage constantPackage);
164
165 /**
166 * @since 6.1
167 */
168 void visitConstantModule(ConstantModule constantModule);
169
170 /**
171 * @since 6.3
172 */
173 default void visitConstantDynamic(final ConstantDynamic constantDynamic) {
174 // empty
175 }
176
177 /**
178 * @since 6.4.0
179 */
180 default void visitModule(final Module constantModule) {
181 // empty
182 }
183
184 /**
185 * @since 6.4.0
186 */
187 default void visitModuleRequires(final ModuleRequires constantModule) {
188 // empty
189 }
190
191 /**
192 * @since 6.4.0
193 */
194 default void visitModuleExports(final ModuleExports constantModule) {
195 // empty
196 }
197
198 /**
199 * @since 6.4.0
200 */
201 default void visitModuleOpens(final ModuleOpens constantModule) {
202 // empty
203 }
204
205 /**
206 * @since 6.4.0
207 */
208 default void visitModuleProvides(final ModuleProvides constantModule) {
209 // empty
210 }
211
212 /**
213 * @since 6.4.0
214 */
215 default void visitModulePackages(final ModulePackages constantModule) {
216 // empty
217 }
218
219 /**
220 * @since 6.4.0
221 */
222 default void visitModuleMainClass(final ModuleMainClass obj) {
223 // empty
224 }
225
226 /**
227 * @since 6.4.0
228 */
229 default void visitNestHost(final NestHost obj) {
230 // empty
231 }
232
233 /**
234 * @since 6.4.0
235 */
236 default void visitNestMembers(final NestMembers obj) {
237 // empty
238 }
239 }
|