public static InstructionMethodItem makeInstructionFormatMethodItem( MethodDefinition methodDef, int codeAddress, Instruction instruction) { if (instruction instanceof OffsetInstruction) { return new OffsetInstructionFormatMethodItem(methodDef.classDef.options, methodDef, codeAddress, (OffsetInstruction)instruction); } if (instruction instanceof UnresolvedOdexInstruction) { return new UnresolvedOdexInstructionMethodItem(methodDef, codeAddress, (UnresolvedOdexInstruction)instruction); } switch (instruction.getOpcode().format) { case ArrayPayload: return new ArrayDataMethodItem(methodDef, codeAddress, (ArrayPayload)instruction); case PackedSwitchPayload: return new PackedSwitchMethodItem(methodDef, codeAddress, (PackedSwitchPayload)instruction); case SparseSwitchPayload: return new SparseSwitchMethodItem(methodDef, codeAddress, (SparseSwitchPayload)instruction); default: return new InstructionMethodItem<Instruction>(methodDef, codeAddress, instruction); } } }
public static InstructionMethodItem makeInstructionFormatMethodItem( MethodDefinition methodDef, int codeAddress, Instruction instruction) { if (instruction instanceof OffsetInstruction) { return new OffsetInstructionFormatMethodItem(methodDef.classDef.options, methodDef, codeAddress, (OffsetInstruction)instruction); } if (instruction instanceof UnresolvedOdexInstruction) { return new UnresolvedOdexInstructionMethodItem(methodDef, codeAddress, (UnresolvedOdexInstruction)instruction); } switch (instruction.getOpcode().format) { case ArrayPayload: return new ArrayDataMethodItem(methodDef, codeAddress, (ArrayPayload)instruction); case PackedSwitchPayload: return new PackedSwitchMethodItem(methodDef, codeAddress, (PackedSwitchPayload)instruction); case SparseSwitchPayload: return new SparseSwitchMethodItem(methodDef, codeAddress, (SparseSwitchPayload)instruction); default: return new InstructionMethodItem<Instruction>(methodDef, codeAddress, instruction); } } }
public static InstructionMethodItem makeInstructionFormatMethodItem( MethodDefinition methodDef, int codeAddress, Instruction instruction) { if (instruction instanceof OffsetInstruction) { return new OffsetInstructionFormatMethodItem(methodDef.classDef.options, methodDef, codeAddress, (OffsetInstruction)instruction); } if (instruction instanceof UnresolvedOdexInstruction) { return new UnresolvedOdexInstructionMethodItem(methodDef, codeAddress, (UnresolvedOdexInstruction)instruction); } switch (instruction.getOpcode().format) { case ArrayPayload: return new ArrayDataMethodItem(methodDef, codeAddress, (ArrayPayload)instruction); case PackedSwitchPayload: return new PackedSwitchMethodItem(methodDef, codeAddress, (PackedSwitchPayload)instruction); case SparseSwitchPayload: return new SparseSwitchMethodItem(methodDef, codeAddress, (SparseSwitchPayload)instruction); default: return new InstructionMethodItem<Instruction>(methodDef, codeAddress, instruction); } } }