本文整理汇总了Java中com.android.dx.io.instructions.DecodedInstruction.getA方法的典型用法代码示例。如果您正苦于以下问题:Java DecodedInstruction.getA方法的具体用法?Java DecodedInstruction.getA怎么用?Java DecodedInstruction.getA使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.android.dx.io.instructions.DecodedInstruction
的用法示例。
在下文中一共展示了DecodedInstruction.getA方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: InvokeNode
import com.android.dx.io.instructions.DecodedInstruction; //导入方法依赖的package包/类
public InvokeNode(MethodInfo mth, DecodedInstruction insn, InvokeType type, boolean isRange, int resReg) {
super(InsnType.INVOKE, mth.getArgsCount() + (type != InvokeType.STATIC ? 1 : 0));
this.mth = mth;
this.type = type;
if (resReg >= 0) {
setResult(InsnArg.reg(resReg, mth.getReturnType()));
}
int k = isRange ? insn.getA() : 0;
if (type != InvokeType.STATIC) {
int r = isRange ? k : InsnUtils.getArg(insn, k);
addReg(r, mth.getDeclClass().getType());
k++;
}
for (ArgType arg : mth.getArgumentsTypes()) {
addReg(isRange ? k : InsnUtils.getArg(insn, k), arg);
k += arg.getRegCount();
}
}
示例2: filledNewArray
import com.android.dx.io.instructions.DecodedInstruction; //导入方法依赖的package包/类
private InsnNode filledNewArray(DecodedInstruction insn, int offset, boolean isRange) {
int resReg = getMoveResultRegister(insnArr, offset);
ArgType arrType = dex.getType(insn.getIndex());
ArgType elType = arrType.getArrayElement();
boolean typeImmutable = elType.isPrimitive();
int regsCount = insn.getRegisterCount();
InsnArg[] regs = new InsnArg[regsCount];
if (isRange) {
int r = insn.getA();
for (int i = 0; i < regsCount; i++) {
regs[i] = InsnArg.reg(r, elType, typeImmutable);
r++;
}
} else {
for (int i = 0; i < regsCount; i++) {
int regNum = InsnUtils.getArg(insn, i);
regs[i] = InsnArg.reg(regNum, elType, typeImmutable);
}
}
InsnNode node = new FilledNewArrayNode(elType, regs.length);
node.setResult(resReg == -1 ? null : InsnArg.reg(resReg, arrType));
for (InsnArg arg : regs) {
node.addArg(arg);
}
return node;
}
示例3: getArg
import com.android.dx.io.instructions.DecodedInstruction; //导入方法依赖的package包/类
public static int getArg(DecodedInstruction insn, int arg) {
switch (arg) {
case 0:
return insn.getA();
case 1:
return insn.getB();
case 2:
return insn.getC();
case 3:
return insn.getD();
case 4:
return insn.getE();
default:
throw new JadxRuntimeException("Wrong argument number: " + arg);
}
}
示例4: getMoveResultRegister
import com.android.dx.io.instructions.DecodedInstruction; //导入方法依赖的package包/类
private int getMoveResultRegister(DecodedInstruction[] insnArr, int offset) {
int nextOffset = getNextInsnOffset(insnArr, offset);
if (nextOffset >= 0) {
DecodedInstruction next = insnArr[nextOffset];
int opc = next.getOpcode();
if (opc == Opcodes.MOVE_RESULT
|| opc == Opcodes.MOVE_RESULT_WIDE
|| opc == Opcodes.MOVE_RESULT_OBJECT) {
return next.getA();
}
}
return -1;
}
示例5: getArg
import com.android.dx.io.instructions.DecodedInstruction; //导入方法依赖的package包/类
public static int getArg(DecodedInstruction insn, int arg) {
switch (arg) {
case 0:
return insn.getA();
case 1:
return insn.getB();
case 2:
return insn.getC();
case 3:
return insn.getD();
case 4:
return insn.getE();
}
throw new JadxRuntimeException("Wrong argument number: " + arg);
}
示例6: fillArray
import com.android.dx.io.instructions.DecodedInstruction; //导入方法依赖的package包/类
private InsnNode fillArray(DecodedInstruction insn) {
DecodedInstruction payload = insnArr[insn.getTarget()];
return new FillArrayNode(insn.getA(), (FillArrayDataPayloadDecodedInstruction) payload);
}