View Javadoc
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: Visitor.html 1018313 2017-09-18 09:03:04Z britter $
26   */
27  public interface Visitor
28  {
29      void visitCode(Code obj);
30  
31      void visitCodeException(CodeException obj);
32  
33      void visitConstantClass(ConstantClass obj);
34  
35      void visitConstantDouble(ConstantDouble obj);
36  
37      void visitConstantFieldref(ConstantFieldref obj);
38  
39      void visitConstantFloat(ConstantFloat obj);
40  
41      void visitConstantInteger(ConstantInteger obj);
42  
43      void visitConstantInterfaceMethodref(ConstantInterfaceMethodref obj);
44  
45      void visitConstantInvokeDynamic(ConstantInvokeDynamic obj);
46  
47      void visitConstantLong(ConstantLong obj);
48  
49      void visitConstantMethodref(ConstantMethodref obj);
50  
51      void visitConstantNameAndType(ConstantNameAndType obj);
52  
53      void visitConstantPool(ConstantPool obj);
54  
55      void visitConstantString(ConstantString obj);
56  
57      void visitConstantUtf8(ConstantUtf8 obj);
58  
59      void visitConstantValue(ConstantValue obj);
60  
61      void visitDeprecated(Deprecated obj);
62  
63      void visitExceptionTable(ExceptionTable obj);
64  
65      void visitField(Field obj);
66  
67      void visitInnerClass(InnerClass obj);
68  
69      void visitInnerClasses(InnerClasses obj);
70  
71      void visitJavaClass(JavaClass obj);
72  
73      void visitLineNumber(LineNumber obj);
74  
75      void visitLineNumberTable(LineNumberTable obj);
76  
77      void visitLocalVariable(LocalVariable obj);
78  
79      void visitLocalVariableTable(LocalVariableTable obj);
80  
81      void visitMethod(Method obj);
82  
83      void visitSignature(Signature obj);
84  
85      void visitSourceFile(SourceFile obj);
86  
87      void visitSynthetic(Synthetic obj);
88  
89      void visitUnknown(Unknown obj);
90  
91      void visitStackMap(StackMap obj);
92  
93      void visitStackMapEntry(StackMapEntry obj);
94  
95      /**
96       * @since 6.0
97       */
98      void visitAnnotation(Annotations obj);
99  
100     /**
101      * @since 6.0
102      */
103     void visitParameterAnnotation(ParameterAnnotations obj);
104 
105     /**
106      * @since 6.0
107      */
108     void visitAnnotationEntry(AnnotationEntry obj);
109 
110     /**
111      * @since 6.0
112      */
113     void visitAnnotationDefault(AnnotationDefault obj);
114 
115     /**
116      * @since 6.0
117      */
118     void visitLocalVariableTypeTable(LocalVariableTypeTable obj);
119 
120     /**
121      * @since 6.0
122      */
123     void visitEnclosingMethod(EnclosingMethod obj);
124 
125     /**
126      * @since 6.0
127      */
128     void visitBootstrapMethods(BootstrapMethods obj);
129 
130     /**
131      * @since 6.0
132      */
133     void visitMethodParameters(MethodParameters obj);
134 
135     /**
136      * @since 6.0
137      */
138     void visitConstantMethodType(ConstantMethodType obj);
139 
140     /**
141      * @since 6.0
142      */
143     void visitConstantMethodHandle(ConstantMethodHandle obj);
144 
145     /**
146      * @since 6.0
147      */
148     void visitParameterAnnotationEntry(ParameterAnnotationEntry obj);
149 
150     /**
151      * @since 6.1
152      */
153     void visitConstantPackage(ConstantPackage constantPackage);
154 
155     /**
156      * @since 6.1
157      */
158     void visitConstantModule(ConstantModule constantModule);
159 }