this.classFileBytes = classFileBytes; this.constantPool = constantPool; this.maxStack = u2At(classFileBytes, 6, offset); this.maxLocals = u2At(classFileBytes, 8, offset); this.codeLength = u4At(classFileBytes, 10, offset); this.codeOffset = offset + 14; int readOffset = (int) (14 + this.codeLength); this.exceptionTableLength = u2At(classFileBytes, readOffset, offset); readOffset += 2; this.exceptionTableEntries = NO_EXCEPTION_TABLE; this.attributesCount = u2At(classFileBytes, readOffset, offset); this.attributes = ClassFileAttribute.NO_ATTRIBUTES; if (this.attributesCount != 0) { readOffset += 2; for (int i = 0; i < this.attributesCount; i++) { IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset)); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) { throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
this.classFileBytes = classFileBytes; this.constantPool = constantPool; this.maxStack = u2At(classFileBytes, 6, offset); this.maxLocals = u2At(classFileBytes, 8, offset); this.codeLength = u4At(classFileBytes, 10, offset); this.codeOffset = offset + 14; int readOffset = (int) (14 + this.codeLength); this.exceptionTableLength = u2At(classFileBytes, readOffset, offset); readOffset += 2; this.exceptionTableEntries = NO_EXCEPTION_TABLE; this.attributesCount = u2At(classFileBytes, readOffset, offset); this.attributes = ClassFileAttribute.NO_ATTRIBUTES; if (this.attributesCount != 0) { readOffset += 2; for (int i = 0; i < this.attributesCount; i++) { IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset)); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) { throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
this.classFileBytes = classFileBytes; this.constantPool = constantPool; this.maxStack = u2At(classFileBytes, 6, offset); this.maxLocals = u2At(classFileBytes, 8, offset); this.codeLength = u4At(classFileBytes, 10, offset); this.codeOffset = offset + 14; int readOffset = (int) (14 + this.codeLength); this.exceptionTableLength = u2At(classFileBytes, readOffset, offset); readOffset += 2; this.exceptionTableEntries = NO_EXCEPTION_TABLE; this.attributesCount = u2At(classFileBytes, readOffset, offset); this.attributes = ClassFileAttribute.NO_ATTRIBUTES; if (this.attributesCount != 0) { readOffset += 2; for (int i = 0; i < this.attributesCount; i++) { IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset)); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) { throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
this.classFileBytes = classFileBytes; this.constantPool = constantPool; this.maxStack = u2At(classFileBytes, 6, offset); this.maxLocals = u2At(classFileBytes, 8, offset); this.codeLength = u4At(classFileBytes, 10, offset); this.codeOffset = offset + 14; int readOffset = (int) (14 + this.codeLength); this.exceptionTableLength = u2At(classFileBytes, readOffset, offset); readOffset += 2; this.exceptionTableEntries = NO_EXCEPTION_TABLE; this.attributesCount = u2At(classFileBytes, readOffset, offset); this.attributes = ClassFileAttribute.NO_ATTRIBUTES; if (this.attributesCount != 0) { readOffset += 2; for (int i = 0; i < this.attributesCount; i++) { IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset)); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) { throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
this.classFileBytes = classFileBytes; this.constantPool = constantPool; this.maxStack = u2At(classFileBytes, 6, offset); this.maxLocals = u2At(classFileBytes, 8, offset); this.codeLength = u4At(classFileBytes, 10, offset); this.codeOffset = offset + 14; int readOffset = (int) (14 + this.codeLength); this.exceptionTableLength = u2At(classFileBytes, readOffset, offset); readOffset += 2; this.exceptionTableEntries = NO_EXCEPTION_TABLE; this.attributesCount = u2At(classFileBytes, readOffset, offset); this.attributes = ClassFileAttribute.NO_ATTRIBUTES; if (this.attributesCount != 0) { readOffset += 2; for (int i = 0; i < this.attributesCount; i++) { IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset)); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) { throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
this.classFileBytes = classFileBytes; this.constantPool = constantPool; this.maxStack = u2At(classFileBytes, 6, offset); this.maxLocals = u2At(classFileBytes, 8, offset); this.codeLength = u4At(classFileBytes, 10, offset); this.codeOffset = offset + 14; int readOffset = (int) (14 + this.codeLength); this.exceptionTableLength = u2At(classFileBytes, readOffset, offset); readOffset += 2; this.exceptionTableEntries = NO_EXCEPTION_TABLE; this.attributesCount = u2At(classFileBytes, readOffset, offset); this.attributes = ClassFileAttribute.NO_ATTRIBUTES; if (this.attributesCount != 0) { readOffset += 2; for (int i = 0; i < this.attributesCount; i++) { IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset)); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) { throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
this.classFileBytes = classFileBytes; this.constantPool = constantPool; this.maxStack = u2At(classFileBytes, 6, offset); this.maxLocals = u2At(classFileBytes, 8, offset); this.codeLength = u4At(classFileBytes, 10, offset); this.codeOffset = offset + 14; int readOffset = (int) (14 + this.codeLength); this.exceptionTableLength = u2At(classFileBytes, readOffset, offset); readOffset += 2; this.exceptionTableEntries = NO_EXCEPTION_TABLE; this.attributesCount = u2At(classFileBytes, readOffset, offset); this.attributes = ClassFileAttribute.NO_ATTRIBUTES; if (this.attributesCount != 0) { readOffset += 2; for (int i = 0; i < this.attributesCount; i++) { IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(u2At(classFileBytes, readOffset, offset)); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) { throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
break; case IOpcodeMnemonics.LDC_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Float break; case IOpcodeMnemonics.LDC2_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Double break; case IOpcodeMnemonics.GETSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.PUTSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.GETFIELD : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) {
break; case IOpcodeMnemonics.LDC_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); checkConstantAndThrow(constantPoolEntry.getKind()); break; case IOpcodeMnemonics.LDC2_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Double break; case IOpcodeMnemonics.GETSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.PUTSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.GETFIELD : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) {
break; case IOpcodeMnemonics.LDC_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Float break; case IOpcodeMnemonics.LDC2_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Double break; case IOpcodeMnemonics.GETSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.PUTSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.GETFIELD : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) {
break; case IOpcodeMnemonics.LDC_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Float break; case IOpcodeMnemonics.LDC2_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Double break; case IOpcodeMnemonics.GETSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.PUTSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.GETFIELD : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) {
break; case IOpcodeMnemonics.LDC_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Float break; case IOpcodeMnemonics.LDC2_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Double break; case IOpcodeMnemonics.GETSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.PUTSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.GETFIELD : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) {
break; case IOpcodeMnemonics.LDC_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Float break; case IOpcodeMnemonics.LDC2_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Double break; case IOpcodeMnemonics.GETSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.PUTSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.GETFIELD : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) {
break; case IOpcodeMnemonics.LDC_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Float break; case IOpcodeMnemonics.LDC2_W : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Double break; case IOpcodeMnemonics.GETSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.PUTSTATIC : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) { break; case IOpcodeMnemonics.GETFIELD : index = u2At(this.classFileBytes, 1, pc); constantPoolEntry = this.constantPool.decodeEntry(index); if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Fieldref) {