public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant) { refConstant.u2classIndex = dataInput.readUnsignedShort(); refConstant.u2nameAndTypeIndex = dataInput.readUnsignedShort(); }
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant) { nameAndTypeConstant.u2nameIndex = dataInput.readUnsignedShort(); nameAndTypeConstant.u2descriptorIndex = dataInput.readUnsignedShort(); }
public void visitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo) { localVariableInfo.u2startPC = dataInput.readUnsignedShort(); localVariableInfo.u2length = dataInput.readUnsignedShort(); localVariableInfo.u2nameIndex = dataInput.readUnsignedShort(); localVariableInfo.u2descriptorIndex = dataInput.readUnsignedShort(); localVariableInfo.u2index = dataInput.readUnsignedShort(); }
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo) { exceptionInfo.u2startPC = dataInput.readUnsignedShort(); exceptionInfo.u2endPC = dataInput.readUnsignedShort(); exceptionInfo.u2handlerPC = dataInput.readUnsignedShort(); exceptionInfo.u2catchType = dataInput.readUnsignedShort(); }
public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo) { localVariableTypeInfo.u2startPC = dataInput.readUnsignedShort(); localVariableTypeInfo.u2length = dataInput.readUnsignedShort(); localVariableTypeInfo.u2nameIndex = dataInput.readUnsignedShort(); localVariableTypeInfo.u2signatureIndex = dataInput.readUnsignedShort(); localVariableTypeInfo.u2index = dataInput.readUnsignedShort(); }
public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue) { enumConstantElementValue.u2typeNameIndex = dataInput.readUnsignedShort(); enumConstantElementValue.u2constantNameIndex = dataInput.readUnsignedShort(); }
public void visitLibraryMember(LibraryClass libraryClass, LibraryMember libraryMember) { // Read the general field information. libraryMember.u2accessFlags = dataInput.readUnsignedShort(); libraryMember.name = getString(dataInput.readUnsignedShort()); libraryMember.descriptor = getString(dataInput.readUnsignedShort()); // Skip the field attributes. skipAttributes(); }
public void visitSameZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameZeroFrame sameZeroFrame) { if (sameZeroFrame.getTag() == StackMapFrame.SAME_ZERO_FRAME_EXTENDED) { sameZeroFrame.u2offsetDelta = dataInput.readUnsignedShort(); } }
private void skipAttributes() { int u2attributesCount = dataInput.readUnsignedShort(); for (int index = 0; index < u2attributesCount; index++) { skipAttribute(); } }
public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue) { // Read the element values. arrayElementValue.u2elementValuesCount = dataInput.readUnsignedShort(); arrayElementValue.elementValues = new ElementValue[arrayElementValue.u2elementValuesCount]; for (int index = 0; index < arrayElementValue.u2elementValuesCount; index++) { ElementValue elementValue = createElementValue(); elementValue.accept(clazz, annotation, this); arrayElementValue.elementValues[index] = elementValue; } }
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant) { int u2length = dataInput.readUnsignedShort(); // Read the UTF-8 bytes. byte[] bytes = new byte[u2length]; dataInput.readFully(bytes); utf8Constant.setBytes(bytes); }
public void visitLineNumberTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberTableAttribute lineNumberTableAttribute) { // Read the line numbers. lineNumberTableAttribute.u2lineNumberTableLength = dataInput.readUnsignedShort(); lineNumberTableAttribute.lineNumberTable = new LineNumberInfo[lineNumberTableAttribute.u2lineNumberTableLength]; for (int index = 0; index < lineNumberTableAttribute.u2lineNumberTableLength; index++) { LineNumberInfo lineNumberInfo = new LineNumberInfo(); this.visitLineNumberInfo(clazz, method, codeAttribute, lineNumberInfo); lineNumberTableAttribute.lineNumberTable[index] = lineNumberInfo; } }
public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute) { // Read the local variables. localVariableTableAttribute.u2localVariableTableLength = dataInput.readUnsignedShort(); localVariableTableAttribute.localVariableTable = new LocalVariableInfo[localVariableTableAttribute.u2localVariableTableLength]; for (int index = 0; index < localVariableTableAttribute.u2localVariableTableLength; index++) { LocalVariableInfo localVariableInfo = new LocalVariableInfo(); this.visitLocalVariableInfo(clazz, method, codeAttribute, localVariableInfo); localVariableTableAttribute.localVariableTable[index] = localVariableInfo; } }
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant) { int u2length = dataInput.readUnsignedShort(); // Read the UTF-8 bytes. byte[] bytes = new byte[u2length]; dataInput.readFully(bytes); utf8Constant.setBytes(bytes); }
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute) { // Read the inner classes. innerClassesAttribute.u2classesCount = dataInput.readUnsignedShort(); innerClassesAttribute.classes = new InnerClassesInfo[innerClassesAttribute.u2classesCount]; for (int index = 0; index < innerClassesAttribute.u2classesCount; index++) { InnerClassesInfo innerClassesInfo = new InnerClassesInfo(); this.visitInnerClassesInfo(clazz, innerClassesInfo); innerClassesAttribute.classes[index] = innerClassesInfo; } }
public void visitAnyAnnotationsAttribute(Clazz clazz, AnnotationsAttribute annotationsAttribute) { // Read the annotations. annotationsAttribute.u2annotationsCount = dataInput.readUnsignedShort(); annotationsAttribute.annotations = new Annotation[annotationsAttribute.u2annotationsCount]; for (int index = 0; index < annotationsAttribute.u2annotationsCount; index++) { Annotation annotation = new Annotation(); this.visitAnnotation(clazz, annotation); annotationsAttribute.annotations[index] = annotation; } }
public void visitMoreZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, MoreZeroFrame moreZeroFrame) { moreZeroFrame.u2offsetDelta = dataInput.readUnsignedShort(); // Read the verification types of the additional local variables. moreZeroFrame.additionalVariables = new VerificationType[moreZeroFrame.additionalVariablesCount]; for (int index = 0; index < moreZeroFrame.additionalVariablesCount; index++) { VerificationType verificationType = createVerificationType(); verificationType.accept(clazz, method, codeAttribute, offset, this); moreZeroFrame.additionalVariables[index] = verificationType; } }
public void visitStackMapAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapAttribute stackMapAttribute) { // Read the stack map frames (only full frames, without tag). stackMapAttribute.u2stackMapFramesCount = dataInput.readUnsignedShort(); stackMapAttribute.stackMapFrames = new FullFrame[stackMapAttribute.u2stackMapFramesCount]; for (int index = 0; index < stackMapAttribute.u2stackMapFramesCount; index++) { FullFrame stackMapFrame = new FullFrame(); this.visitFullFrame(clazz, method, codeAttribute, index, stackMapFrame); stackMapAttribute.stackMapFrames[index] = stackMapFrame; } }
public void visitStackMapTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapTableAttribute stackMapTableAttribute) { // Read the stack map frames. stackMapTableAttribute.u2stackMapFramesCount = dataInput.readUnsignedShort(); stackMapTableAttribute.stackMapFrames = new StackMapFrame[stackMapTableAttribute.u2stackMapFramesCount]; for (int index = 0; index < stackMapTableAttribute.u2stackMapFramesCount; index++) { StackMapFrame stackMapFrame = createStackMapFrame(); stackMapFrame.accept(clazz, method, codeAttribute, 0, this); stackMapTableAttribute.stackMapFrames[index] = stackMapFrame; } }
public void visitSameOneFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameOneFrame sameOneFrame) { if (sameOneFrame.getTag() == StackMapFrame.SAME_ONE_FRAME_EXTENDED) { sameOneFrame.u2offsetDelta = dataInput.readUnsignedShort(); } // Read the verification type of the stack entry. VerificationType verificationType = createVerificationType(); verificationType.accept(clazz, method, codeAttribute, offset, this); sameOneFrame.stackItem = verificationType; }