mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 04:27:38 +02:00
Simply the generic-ity around Instruction, OffsetInstruction and InstructionMethodItem
This commit is contained in:
@ -34,7 +34,7 @@ import org.jf.dexlib.Code.Opcode;
|
||||
import org.jf.dexlib.DexFile;
|
||||
import org.jf.dexlib.Util.AnnotatedOutput;
|
||||
|
||||
public class Instruction10t extends Instruction implements OffsetInstruction {
|
||||
public class Instruction10t extends OffsetInstruction {
|
||||
public static final InstructionFactory Factory = new Factory();
|
||||
private int targetAddressOffset;
|
||||
|
||||
|
@ -35,7 +35,7 @@ import org.jf.dexlib.DexFile;
|
||||
import org.jf.dexlib.Util.AnnotatedOutput;
|
||||
import org.jf.dexlib.Util.NumberUtils;
|
||||
|
||||
public class Instruction20t extends Instruction implements OffsetInstruction {
|
||||
public class Instruction20t extends OffsetInstruction {
|
||||
public static final InstructionFactory Factory = new Factory();
|
||||
private int targetAddressOffset;
|
||||
|
||||
|
@ -36,7 +36,7 @@ import org.jf.dexlib.DexFile;
|
||||
import org.jf.dexlib.Util.AnnotatedOutput;
|
||||
import org.jf.dexlib.Util.NumberUtils;
|
||||
|
||||
public class Instruction21t extends Instruction implements OffsetInstruction, SingleRegisterInstruction {
|
||||
public class Instruction21t extends OffsetInstruction implements SingleRegisterInstruction {
|
||||
public static final Instruction.InstructionFactory Factory = new Factory();
|
||||
private byte regA;
|
||||
private short targetAddressOffset;
|
||||
|
@ -36,7 +36,7 @@ import org.jf.dexlib.DexFile;
|
||||
import org.jf.dexlib.Util.AnnotatedOutput;
|
||||
import org.jf.dexlib.Util.NumberUtils;
|
||||
|
||||
public class Instruction22t extends Instruction implements OffsetInstruction, TwoRegisterInstruction {
|
||||
public class Instruction22t extends OffsetInstruction implements TwoRegisterInstruction {
|
||||
public static final Instruction.InstructionFactory Factory = new Factory();
|
||||
private byte regA;
|
||||
private byte regB;
|
||||
|
@ -35,7 +35,7 @@ import org.jf.dexlib.DexFile;
|
||||
import org.jf.dexlib.Util.AnnotatedOutput;
|
||||
import org.jf.dexlib.Util.NumberUtils;
|
||||
|
||||
public class Instruction30t extends Instruction implements OffsetInstruction {
|
||||
public class Instruction30t extends OffsetInstruction {
|
||||
public static final InstructionFactory Factory = new Factory();
|
||||
private int targetAddressOffset;
|
||||
|
||||
|
@ -36,7 +36,7 @@ import org.jf.dexlib.DexFile;
|
||||
import org.jf.dexlib.Util.AnnotatedOutput;
|
||||
import org.jf.dexlib.Util.NumberUtils;
|
||||
|
||||
public class Instruction31t extends Instruction implements OffsetInstruction, SingleRegisterInstruction {
|
||||
public class Instruction31t extends OffsetInstruction implements SingleRegisterInstruction {
|
||||
public static final Instruction.InstructionFactory Factory = new Factory();
|
||||
private byte regA;
|
||||
private int targetAddressOffset;
|
||||
|
@ -28,7 +28,11 @@
|
||||
|
||||
package org.jf.dexlib.Code;
|
||||
|
||||
public interface OffsetInstruction {
|
||||
public int getTargetAddressOffset();
|
||||
public void updateTargetAddressOffset(int targetAddressOffset);
|
||||
public abstract class OffsetInstruction extends Instruction {
|
||||
protected OffsetInstruction(Opcode opcode) {
|
||||
super(opcode);
|
||||
}
|
||||
|
||||
public abstract int getTargetAddressOffset();
|
||||
public abstract void updateTargetAddressOffset(int targetAddressOffset);
|
||||
}
|
||||
|
Reference in New Issue
Block a user