def readInfo(self, reader:ClassReader): self.maxStack = reader.readUint16() self.maxLocals = reader.readUint16() codeLength = struct.unpack('>I',reader.readUint32())[0] self.code = reader.readBytes(codeLength) self.exceptionTable = readExceptionTable(reader) self.attributes = readAttributes(reader, self.cp)
def readAttribute(reader:ClassReader, cp:ConstantPool) -> AttributeInfo: attrNameIndex = reader.readUint16() attrName = cp.getUtf8(attrNameIndex) attrLen = struct.unpack('>I',reader.readUint32())[0] attrInfo = newAttributeInfo(attrName, attrLen, cp) attrInfo.readInfo(reader) return attrInfo
def readInfo(self,reader:ClassReader): bts = reader.readUint32() self.val = struct.unpack('>f',bts)[0]