本文整理汇总了Java中org.jf.dexlib2.iface.instruction.formats.Instruction23x.getOpcode方法的典型用法代码示例。如果您正苦于以下问题:Java Instruction23x.getOpcode方法的具体用法?Java Instruction23x.getOpcode怎么用?Java Instruction23x.getOpcode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jf.dexlib2.iface.instruction.formats.Instruction23x
的用法示例。
在下文中一共展示了Instruction23x.getOpcode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: jimplify
import org.jf.dexlib2.iface.instruction.formats.Instruction23x; //导入方法依赖的package包/类
public void jimplify (DexBody body) {
if(!(instruction instanceof Instruction23x))
throw new IllegalArgumentException("Expected Instruction23x but got: "+instruction.getClass());
Instruction23x aPutInstr = (Instruction23x)instruction;
int source = aPutInstr.getRegisterA();
Local arrayBase = body.getRegisterLocal(aPutInstr.getRegisterB());
Local index = body.getRegisterLocal(aPutInstr.getRegisterC());
ArrayRef arrayRef = Jimple.v().newArrayRef(arrayBase, index);
Local sourceValue = body.getRegisterLocal(source);
assign = getAssignStmt(body, sourceValue, arrayRef);
if (aPutInstr.getOpcode().value == Opcode.APUT_OBJECT.value)
assign.addTag(new ObjectOpTag());
setUnit(assign);
addTags(assign);
body.add(assign);
if (IDalvikTyper.ENABLE_DVKTYPER) {
Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ assign);
DalvikTyper.v().addConstraint(assign.getLeftOpBox(), assign.getRightOpBox());
DalvikTyper.v().setType(arrayRef.getIndexBox(), IntType.v(), true);
}
}
示例2: newBuilderInstruction23x
import org.jf.dexlib2.iface.instruction.formats.Instruction23x; //导入方法依赖的package包/类
@Nonnull
private BuilderInstruction23x newBuilderInstruction23x(@Nonnull Instruction23x instruction) {
return new BuilderInstruction23x(
instruction.getOpcode(),
instruction.getRegisterA(),
instruction.getRegisterB(),
instruction.getRegisterC());
}
示例3: of
import org.jf.dexlib2.iface.instruction.formats.Instruction23x; //导入方法依赖的package包/类
public static ImmutableInstruction23x of(Instruction23x instruction) {
if (instruction instanceof ImmutableInstruction23x) {
return (ImmutableInstruction23x)instruction;
}
return new ImmutableInstruction23x(
instruction.getOpcode(),
instruction.getRegisterA(),
instruction.getRegisterB(),
instruction.getRegisterC());
}
示例4: jimplify
import org.jf.dexlib2.iface.instruction.formats.Instruction23x; //导入方法依赖的package包/类
public void jimplify (DexBody body) throws InvalidDalvikBytecodeException {
if(!(instruction instanceof Instruction23x))
throw new IllegalArgumentException("Expected Instruction23x but got: "+instruction.getClass());
Instruction23x aGetInstr = (Instruction23x)instruction;
int dest = aGetInstr.getRegisterA();
Local arrayBase = body.getRegisterLocal(aGetInstr.getRegisterB());
Local index = body.getRegisterLocal(aGetInstr.getRegisterC());
ArrayRef arrayRef = Jimple.v().newArrayRef(arrayBase, index);
Local l = body.getRegisterLocal(dest);
assign = Jimple.v().newAssignStmt(l, arrayRef);
if (aGetInstr.getOpcode().value == Opcode.AGET_OBJECT.value)
assign.addTag(new ObjectOpTag());
setUnit(assign);
addTags(assign);
body.add(assign);
if (IDalvikTyper.ENABLE_DVKTYPER) {
Debug.printDbg(IDalvikTyper.DEBUG, "constraint: "+ assign);
DalvikTyper.v().addConstraint(assign.getLeftOpBox(), assign.getRightOpBox());
DalvikTyper.v().setType(arrayRef.getIndexBox(), IntType.v(), true);
}
}
示例5: of
import org.jf.dexlib2.iface.instruction.formats.Instruction23x; //导入方法依赖的package包/类
public static ImmutableInstruction23x of(Instruction23x instruction) {
if (instruction instanceof ImmutableInstruction23x) {
return (ImmutableInstruction23x) instruction;
}
return new ImmutableInstruction23x(
instruction.getOpcode(),
instruction.getRegisterA(),
instruction.getRegisterB(),
instruction.getRegisterC());
}