Transforms are simple Instruction modifiers that can be called on each
Instruction by the
expand_constants(ins: jawa.util.bytecode.Instruction, *, cf) → jawa.util.bytecode.Instruction¶
Replace CONSTANT_INDEX operands with the literal Constant object from the constant pool.
- ins – Instruction to potentially modify.
- cf – The ClassFile instance used to resolve Constants.
Potentially modified instruction.
simple_swap(ins: jawa.util.bytecode.Instruction) → jawa.util.bytecode.Instruction¶
Replaces one instruction with another based on the transform rules in the bytecode definitions. This can help simplify your code as it reduces the overall number of instructions. For example, aload_0 will become aload 0.
Parameters: ins – Instruction to potentially modify. Returns: Potentially modified instruction.