2 * Copyright (C) 2014, United States Government, as represented by the
3 * Administrator of the National Aeronautics and Space Administration.
6 * The Java Pathfinder core (jpf-core) platform is licensed under the
7 * Apache License, Version 2.0 (the "License"); you may not use this file except
8 * in compliance with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0.
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 package gov.nasa.jpf.jvm;
21 import gov.nasa.jpf.vm.ClassParseException;
24 * adapter class implementing the ClassFileReader interface
26 public class ClassFileReaderAdapter implements ClassFileReader {
29 public void setClass(ClassFile cf, String clsName, String superClsName, int flags, int cpCount) throws ClassParseException {}
32 public void setInterfaceCount(ClassFile cf, int ifcCount) {}
35 public void setInterface(ClassFile cf, int ifcIndex, String ifcName) {}
38 public void setInterfacesDone(ClassFile cf) {};
41 public void setFieldCount(ClassFile cf, int fieldCount) {}
44 public void setField(ClassFile cf, int fieldIndex, int accessFlags, String name, String descriptor) {}
47 public void setFieldAttributeCount(ClassFile cf, int fieldIndex, int attrCount) {}
50 public void setFieldAttribute(ClassFile cf, int fieldIndex, int attrIndex, String name, int attrLength) {}
53 public void setFieldAttributesDone(ClassFile cf, int fieldIndex) {}
56 public void setFieldDone(ClassFile cf, int fieldIndex) {}
59 public void setFieldsDone(ClassFile cf) {}
62 public void setConstantValue(ClassFile cf, Object tag, Object value) {}
65 public void setMethodCount(ClassFile cf, int methodCount) {}
68 public void setMethod(ClassFile cf, int methodIndex, int accessFlags, String name, String descriptor) {}
71 public void setMethodAttributeCount(ClassFile cf, int methodIndex, int attrCount) {}
74 public void setMethodAttribute(ClassFile cf, int methodIndex, int attrIndex, String name, int attrLength) {}
77 public void setMethodAttributesDone(ClassFile cf, int methodIndex){}
80 public void setMethodDone(ClassFile cf, int methodIndex) {}
83 public void setMethodsDone(ClassFile cf) {}
86 public void setExceptionCount(ClassFile cf, Object tag, int exceptionCount) {}
89 public void setException(ClassFile cf, Object tag, int exceptionIndex, String exceptionType) {}
92 public void setExceptionsDone(ClassFile cf, Object tag) {}
95 public void setCode(ClassFile cf, Object tag, int maxStack, int maxLocals, int codeLength) {}
98 public void setExceptionHandlerTableCount(ClassFile cf, Object tag, int exceptionTableCount) {}
101 public void setExceptionHandler(ClassFile cf, Object tag, int exceptionIndex,
102 int startPc, int endPc, int handlerPc, String catchType) {}
105 public void setExceptionHandlerTableDone(ClassFile cf, Object tag) {}
108 public void setCodeAttributeCount(ClassFile cf, Object tag, int attrCount) {}
111 public void setCodeAttribute(ClassFile cf, Object tag, int attrIndex, String name, int attrLength) {}
114 public void setCodeAttributesDone (ClassFile cf, Object tag) {}
117 public void setLineNumberTableCount(ClassFile cf, Object tag, int lineNumberCount) {}
120 public void setLineNumber(ClassFile cf, Object tag, int lineIndex, int lineNumber, int startPc) {}
123 public void setLineNumberTableDone(ClassFile cf, Object tag) {}
126 public void setLocalVarTableCount(ClassFile cf, Object tag, int localVarCount) {}
129 public void setLocalVar(ClassFile cf, Object tag, int localVarIndex,
130 String varName, String descriptor, int scopeStartPc, int scopeEndPc, int slotIndex) {}
133 public void setLocalVarTableDone (ClassFile cf, Object tag) {}
136 public void setClassAttributeCount(ClassFile cf, int attrCount) {}
139 public void setClassAttribute(ClassFile cf, int attrIndex, String name, int attrLength) {}
142 public void setClassAttributesDone(ClassFile cf) {}
145 public void setSourceFile(ClassFile cf, Object tag, String pathName) {}
148 public void setInnerClassCount(ClassFile cf, Object tag, int innerClsCount) {}
151 public void setInnerClass(ClassFile cf, Object tag, int innerClsIndex,
152 String outerName, String innerName, String innerSimpleName, int accessFlags) {}
155 public void setInnerClassesDone(ClassFile cf, Object tag) {}
158 public void setBootstrapMethodCount (ClassFile cf, Object tag, int count) {}
161 public void setBootstrapMethod (ClassFile cf, Object tag, int idx, int refKind, String cls, String mth, String descriptor, int[] cpArgs){}
164 public void setBootstrapMethodsDone (ClassFile cf, Object tag) {}
167 public void setEnclosingMethod(ClassFile cf, Object tag, String enclosingClass, String enclosingMethod, String descriptor) {}
170 public void setAnnotationCount(ClassFile cf, Object tag, int annotationCount){}
172 public void setAnnotation(ClassFile cf, Object tag, int annotationIndex, String annotationType){}
174 public void setAnnotationsDone(ClassFile cf, Object tag) {}
176 //--- Java 8 type annotations
178 public void setTypeAnnotationCount(ClassFile cf, Object tag, int annotationCount){}
180 public void setTypeParameterAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int typeIndex, short[] typePath, String annotationType){}
182 public void setSuperTypeAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int superTypeIdx, short[] typePath, String annotationType){}
184 public void setTypeParameterBoundAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int typeParamIdx, int boundIdx, short[] typePath, String annotationType){}
186 public void setTypeAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, short[] typePath, String annotationType){}
188 public void setFormalParameterAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int formalParamIdx, short[] typePath, String annotationType){}
190 public void setThrowsAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int throwsTypeIdx, short[] typePath, String annotationType){}
192 public void setVariableAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, long[] scopeEntries, short[] typePath, String annotationType){}
194 public void setExceptionParameterAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int exceptionIndex, short[] typePath, String annotationType){}
196 public void setBytecodeAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int offset, short[] typePath, String annotationType){}
198 public void setBytecodeTypeParameterAnnotation(ClassFile cf, Object tag, int annotationIndex, int targetType, int offset, int typeArgIdx, short[] typePath, String annotationType){}
200 public void setTypeAnnotationsDone(ClassFile cf, Object tag) {}
203 public void setAnnotationValueCount(ClassFile cf, Object tag, int annotationIndex, int annotationCount) {}
206 public void setPrimitiveAnnotationValue(ClassFile cf, Object tag, int annotationIndex, int valueIndex,
207 String elementName, int arrayIndex, Object val){}
210 public void setStringAnnotationValue(ClassFile cf, Object tag, int annotationIndex, int valueIndex,
211 String elementName, int arrayIndex, String s){}
214 public void setClassAnnotationValue(ClassFile cf, Object tag, int annotationIndex, int valueIndex,
215 String elementName, int arrayIndex, String typeName){}
218 public void setEnumAnnotationValue(ClassFile cf, Object tag, int annotationIndex, int valueIndex,
219 String elementName, int arrayIndex, String enumType, String enumValue){}
222 public void setAnnotationValueElementCount(ClassFile cf, Object tag, int annotationIndex, int valueIndex,
223 String elementName, int elementCount) {}
226 public void setAnnotationValueElementsDone(ClassFile cf, Object tag, int annotationIndex, int valueIndex,
227 String elementName) {}
230 public void setAnnotationValuesDone(ClassFile cf, Object tag, int annotationIndex) {}
233 public void setParameterCount(ClassFile cf, Object tag, int parameterCount) {}
236 public void setParameterAnnotationCount(ClassFile cf, Object tag, int paramIndex, int annotationCount) {}
239 public void setParameterAnnotation(ClassFile cf, Object tag, int annotationIndex, String annotationType) {}
242 public void setParameterAnnotationsDone(ClassFile cf, Object tag, int paramIndex) {}
245 public void setParametersDone(ClassFile cf, Object tag) {}
248 public void setSignature(ClassFile cf, Object tag, String signature) {}
251 public void setAnnotationFieldValue(ClassFile cf, Object tag, int annotationIndex, int valueIndex, String elementName, int arrayIndex) {}