1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements.  See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License.  You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *  Unless required by applicable law or agreed to in writing, software
12  *  distributed under the License is distributed on an "AS IS" BASIS,
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *  See the License for the specific language governing permissions and
15  *  limitations under the License.
16  *
17  */
18 package org.apache.bcel.classfile;
19 
20 /**
21  * Interface to make use of the Visitor pattern programming style. I.e. a class
22  * that implements this interface can traverse the contents of a Java class just
23  * by calling the `accept' method which all classes have.
24  *
25  * @version $Id$
26  */
27 public interface Visitor
28 {
visitCode(Code obj)29     void visitCode(Code obj);
30 
visitCodeException(CodeException obj)31     void visitCodeException(CodeException obj);
32 
visitConstantClass(ConstantClass obj)33     void visitConstantClass(ConstantClass obj);
34 
visitConstantDouble(ConstantDouble obj)35     void visitConstantDouble(ConstantDouble obj);
36 
visitConstantFieldref(ConstantFieldref obj)37     void visitConstantFieldref(ConstantFieldref obj);
38 
visitConstantFloat(ConstantFloat obj)39     void visitConstantFloat(ConstantFloat obj);
40 
visitConstantInteger(ConstantInteger obj)41     void visitConstantInteger(ConstantInteger obj);
42 
visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj)43     void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);
44 
visitConstantInvokeDynamic(ConstantInvokeDynamic obj)45     void visitConstantInvokeDynamic(ConstantInvokeDynamic obj);
46 
visitConstantLong(ConstantLong obj)47     void visitConstantLong(ConstantLong obj);
48 
visitConstantMethodref(ConstantMethodref obj)49     void visitConstantMethodref(ConstantMethodref obj);
50 
visitConstantNameAndType(ConstantNameAndType obj)51     void visitConstantNameAndType(ConstantNameAndType obj);
52 
visitConstantPool(ConstantPool obj)53     void visitConstantPool(ConstantPool obj);
54 
visitConstantString(ConstantString obj)55     void visitConstantString(ConstantString obj);
56 
visitConstantUtf8(ConstantUtf8 obj)57     void visitConstantUtf8(ConstantUtf8 obj);
58 
visitConstantValue(ConstantValue obj)59     void visitConstantValue(ConstantValue obj);
60 
visitDeprecated(Deprecated obj)61     void visitDeprecated(Deprecated obj);
62 
visitExceptionTable(ExceptionTable obj)63     void visitExceptionTable(ExceptionTable obj);
64 
visitField(Field obj)65     void visitField(Field obj);
66 
visitInnerClass(InnerClass obj)67     void visitInnerClass(InnerClass obj);
68 
visitInnerClasses(InnerClasses obj)69     void visitInnerClasses(InnerClasses obj);
70 
visitJavaClass(JavaClass obj)71     void visitJavaClass(JavaClass obj);
72 
visitLineNumber(LineNumber obj)73     void visitLineNumber(LineNumber obj);
74 
visitLineNumberTable(LineNumberTable obj)75     void visitLineNumberTable(LineNumberTable obj);
76 
visitLocalVariable(LocalVariable obj)77     void visitLocalVariable(LocalVariable obj);
78 
visitLocalVariableTable(LocalVariableTable obj)79     void visitLocalVariableTable(LocalVariableTable obj);
80 
visitMethod(Method obj)81     void visitMethod(Method obj);
82 
visitSignature(Signature obj)83     void visitSignature(Signature obj);
84 
visitSourceFile(SourceFile obj)85     void visitSourceFile(SourceFile obj);
86 
visitSynthetic(Synthetic obj)87     void visitSynthetic(Synthetic obj);
88 
visitUnknown(Unknown obj)89     void visitUnknown(Unknown obj);
90 
visitStackMap(StackMap obj)91     void visitStackMap(StackMap obj);
92 
visitStackMapEntry(StackMapEntry obj)93     void visitStackMapEntry(StackMapEntry obj);
94 
95     /**
96      * @since 6.0
97      */
visitAnnotation(Annotations obj)98     void visitAnnotation(Annotations obj);
99 
100     /**
101      * @since 6.0
102      */
visitParameterAnnotation(ParameterAnnotations obj)103     void visitParameterAnnotation(ParameterAnnotations obj);
104 
105     /**
106      * @since 6.0
107      */
visitAnnotationEntry(AnnotationEntry obj)108     void visitAnnotationEntry(AnnotationEntry obj);
109 
110     /**
111      * @since 6.0
112      */
visitAnnotationDefault(AnnotationDefault obj)113     void visitAnnotationDefault(AnnotationDefault obj);
114 
115     /**
116      * @since 6.0
117      */
visitLocalVariableTypeTable(LocalVariableTypeTable obj)118     void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
119 
120     /**
121      * @since 6.0
122      */
visitEnclosingMethod(EnclosingMethod obj)123     void visitEnclosingMethod(EnclosingMethod obj);
124 
125     /**
126      * @since 6.0
127      */
visitBootstrapMethods(BootstrapMethods obj)128     void visitBootstrapMethods(BootstrapMethods obj);
129 
130     /**
131      * @since 6.0
132      */
visitMethodParameters(MethodParameters obj)133     void visitMethodParameters(MethodParameters obj);
134 
135     /**
136      * @since 6.0
137      */
visitConstantMethodType(ConstantMethodType obj)138     void visitConstantMethodType(ConstantMethodType obj);
139 
140     /**
141      * @since 6.0
142      */
visitConstantMethodHandle(ConstantMethodHandle obj)143     void visitConstantMethodHandle(ConstantMethodHandle obj);
144 
145     /**
146      * @since 6.0
147      */
visitParameterAnnotationEntry(ParameterAnnotationEntry obj)148     void visitParameterAnnotationEntry(ParameterAnnotationEntry obj);
149 
150     /**
151      * @since 6.1
152      */
visitConstantPackage(ConstantPackage constantPackage)153     void visitConstantPackage(ConstantPackage constantPackage);
154 
155     /**
156      * @since 6.1
157      */
visitConstantModule(ConstantModule constantModule)158     void visitConstantModule(ConstantModule constantModule);
159 }
160