本文整理汇总了Java中com.android.dx.io.Opcodes.NO_NEXT属性的典型用法代码示例。如果您正苦于以下问题:Java Opcodes.NO_NEXT属性的具体用法?Java Opcodes.NO_NEXT怎么用?Java Opcodes.NO_NEXT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.android.dx.io.Opcodes
的用法示例。
在下文中一共展示了Opcodes.NO_NEXT属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNextOrNull
/**
* Gets the next {@link Dop} in the instruction fitting chain after the
* given instance, if any.
*
* @param opcode {@code non-null;} the opcode
* @param options {@code non-null;} options, used to determine
* which opcodes are potentially off-limits
* @return {@code null-ok;} the next opcode in the same family, in the
* chain of opcodes to try, or {@code null} if the given opcode is
* the last in its chain
*/
public static Dop getNextOrNull(Dop opcode, DexOptions options) {
boolean suppressExtendedOpcodes = !options.canUseExtendedOpcodes();
for (;;) {
int nextOpcode = opcode.getNextOpcode();
if (nextOpcode == Opcodes.NO_NEXT) {
return null;
}
opcode = get(nextOpcode);
if (suppressExtendedOpcodes && Opcodes.isExtended(nextOpcode)) {
/*
* Continuing rather than just returning null here
* protects against the possibility that an
* instruction fitting chain might list non-extended
* opcodes after extended ones.
*/
continue;
}
return opcode;
}
}
示例2: getNextOrNull
/**
* Gets the next {@link Dop} in the instruction fitting chain after the
* given instance, if any.
*
* @param opcode {@code non-null;} the opcode
* @param options {@code non-null;} options, used to determine
* which opcodes are potentially off-limits
* @return {@code null-ok;} the next opcode in the same family, in the
* chain of opcodes to try, or {@code null} if the given opcode is
* the last in its chain
*/
public static Dop getNextOrNull(Dop opcode, DexOptions options) {
int nextOpcode = opcode.getNextOpcode();
if (nextOpcode == Opcodes.NO_NEXT) {
return null;
}
opcode = get(nextOpcode);
return opcode;
}