本文整理汇总了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;
}
示例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;
}