当前位置: 首页>>代码示例>>Java>>正文


Java Opcodes.NO_NEXT属性代码示例

本文整理汇总了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;
    }
}
 
开发者ID:AndreJCL,项目名称:JCL,代码行数:36,代码来源:Dops.java

示例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;
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:22,代码来源:Dops.java


注:本文中的com.android.dx.io.Opcodes.NO_NEXT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。