def disassemble(self): """ Disassembles this method. """ fio = StringIO(self._code) for ins in iter(lambda: read_instruction(fio, fio.tell()), None): yield ins
def disassemble(self): """ Disassembles this method, yielding an iterable of :class:`~jawa.util.bytecode.Instruction` objects. """ fio = StringIO(self._code) for ins in iter(lambda: read_instruction(fio, fio.tell()), None): yield ins
def disassemble(self, *, transforms=None) -> Iterator[Instruction]: """ Disassembles this method, yielding an iterable of :class:`~jawa.util.bytecode.Instruction` objects. """ if transforms is None: if self.cf.classloader: transforms = self.cf.classloader.bytecode_transforms else: transforms = [] transforms = [self._bind_transform(t) for t in transforms] with io.BytesIO(self._code) as code: ins_iter = iter(lambda: read_instruction(code, code.tell()), None) for ins in ins_iter: for transform in transforms: ins = transform(ins) yield ins