1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 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); 50 51 void visitConstantLong(ConstantLong obj); 52 53 void visitConstantMethodref(ConstantMethodref obj); 54 55 void visitConstantNameAndType(ConstantNameAndType obj); 56 57 void visitConstantPool(ConstantPool obj); 58 59 void visitConstantString(ConstantString obj); 60 61 void visitConstantUtf8(ConstantUtf8 obj); 62 63 void visitConstantValue(ConstantValue obj); 64 65 void visitDeprecated(Deprecated obj); 66 67 void visitExceptionTable(ExceptionTable obj); 68 69 void visitField(Field obj); 70 71 void visitInnerClass(InnerClass obj); 72 73 void visitInnerClasses(InnerClasses obj); 74 75 void visitJavaClass(JavaClass obj); 76 77 void visitLineNumber(LineNumber obj); 78 79 void visitLineNumberTable(LineNumberTable obj); 80 81 void visitLocalVariable(LocalVariable obj); 82 83 void visitLocalVariableTable(LocalVariableTable obj); 84 85 void visitMethod(Method obj); 86 87 void visitSignature(Signature obj); 88 89 void visitSourceFile(SourceFile obj); 90 91 void visitSynthetic(Synthetic obj); 92 93 void visitUnknown(Unknown obj); 94 95 void visitStackMap(StackMap obj); 96 97 void visitStackMapEntry(StackMapEntry obj); 98 99 /** 100 * @since 6.0 101 */ 102 void visitAnnotation(Annotations obj); 103 104 /** 105 * @since 6.0 106 */ 107 void visitParameterAnnotation(ParameterAnnotations obj); 108 109 /** 110 * @since 6.0 111 */ 112 void visitAnnotationEntry(AnnotationEntry obj); 113 114 /** 115 * @since 6.0 116 */ 117 void visitAnnotationDefault(AnnotationDefault obj); 118 119 /** 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 }