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


Java Opcodes.isValidShape方法代码示例

本文整理汇总了Java中com.android.dx.io.Opcodes.isValidShape方法的典型用法代码示例。如果您正苦于以下问题:Java Opcodes.isValidShape方法的具体用法?Java Opcodes.isValidShape怎么用?Java Opcodes.isValidShape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.android.dx.io.Opcodes的用法示例。


在下文中一共展示了Opcodes.isValidShape方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Dop

import com.android.dx.io.Opcodes; //导入方法依赖的package包/类
/**
 * Constructs an instance.
 *
 * @param opcode {@code Opcodes.isValid();} the opcode value
 * itself
 * @param family {@code Opcodes.isValid();} the opcode family
 * @param nextOpcode {@code Opcodes.isValid();} what opcode (by
 * number) to try next when attempting to match an opcode to
 * particular arguments; {@code Opcodes.NO_NEXT} to indicate that
 * this is the last opcode to try in a particular chain
 * @param format {@code non-null;} the instruction format
 * @param hasResult whether the opcode has a result register; if so it
 * is always the first register
 */
public Dop(int opcode, int family, int nextOpcode, InsnFormat format,
        boolean hasResult) {
    if (!Opcodes.isValidShape(opcode)) {
        throw new IllegalArgumentException("bogus opcode");
    }

    if (!Opcodes.isValidShape(family)) {
        throw new IllegalArgumentException("bogus family");
    }

    if (!Opcodes.isValidShape(nextOpcode)) {
        throw new IllegalArgumentException("bogus nextOpcode");
    }

    if (format == null) {
        throw new NullPointerException("format == null");
    }

    this.opcode = opcode;
    this.family = family;
    this.nextOpcode = nextOpcode;
    this.format = format;
    this.hasResult = hasResult;
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:39,代码来源:Dop.java

示例2: DecodedInstruction

import com.android.dx.io.Opcodes; //导入方法依赖的package包/类
/**
 * Constructs an instance.
 */
public DecodedInstruction(InstructionCodec format, int opcode,
        int index, IndexType indexType, int target, long literal) {
    if (format == null) {
        throw new NullPointerException("format == null");
    }

    if (!Opcodes.isValidShape(opcode)) {
        throw new IllegalArgumentException("invalid opcode");
    }

    this.format = format;
    this.opcode = opcode;
    this.index = index;
    this.indexType = indexType;
    this.target = target;
    this.literal = literal;
}
 
开发者ID:JLLK,项目名称:multidex-maker,代码行数:21,代码来源:DecodedInstruction.java


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