예제 #1
0
 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)
예제 #2
0
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
예제 #3
0
 def readInfo(self,reader:ClassReader):
     bts = reader.readUint32()
     self.val = struct.unpack('>f',bts)[0]