本文整理汇总了Java中proguard.classfile.instruction.InstructionConstants.OP_INSTANCEOF属性的典型用法代码示例。如果您正苦于以下问题:Java InstructionConstants.OP_INSTANCEOF属性的具体用法?Java InstructionConstants.OP_INSTANCEOF怎么用?Java InstructionConstants.OP_INSTANCEOF使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类proguard.classfile.instruction.InstructionConstants
的用法示例。
在下文中一共展示了InstructionConstants.OP_INSTANCEOF属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
{
if (constantInstruction.opcode == InstructionConstants.OP_INSTANCEOF)
{
clazz.constantPoolEntryAccept(constantInstruction.constantIndex, this);
}
}
示例2: visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
{
byte opcode = constantInstruction.opcode;
// Check for instructions that may throw exceptions.
switch (opcode)
{
case InstructionConstants.OP_GETSTATIC:
case InstructionConstants.OP_PUTSTATIC:
case InstructionConstants.OP_GETFIELD:
case InstructionConstants.OP_PUTFIELD:
case InstructionConstants.OP_INVOKEVIRTUAL:
case InstructionConstants.OP_INVOKESPECIAL:
case InstructionConstants.OP_INVOKESTATIC:
case InstructionConstants.OP_INVOKEINTERFACE:
case InstructionConstants.OP_NEW:
case InstructionConstants.OP_ANEWARRAY:
case InstructionConstants.OP_CHECKCAST:
case InstructionConstants.OP_INSTANCEOF:
case InstructionConstants.OP_MULTIANEWARRAY:
// These instructions may throw exceptions.
mayThrowExceptions = true;
}
// case InstructionConstants.OP_INVOKEVIRTUAL:
// case InstructionConstants.OP_INVOKESPECIAL:
// case InstructionConstants.OP_INVOKESTATIC:
// case InstructionConstants.OP_INVOKEINTERFACE:
// // Check if the invoking the method may throw an exception.
// clazz.constantPoolEntryAccept(constantInstruction.constantIndex, this);
}