本文整理匯總了Java中org.objectweb.asm.Type.INT_TYPE屬性的典型用法代碼示例。如果您正苦於以下問題:Java Type.INT_TYPE屬性的具體用法?Java Type.INT_TYPE怎麽用?Java Type.INT_TYPE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.objectweb.asm.Type
的用法示例。
在下文中一共展示了Type.INT_TYPE屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: opType
private static Type opType(int opcode) {
switch (opcode) {
case Opcodes.IADD:
case Opcodes.ISUB:
case Opcodes.IMUL:
case Opcodes.IDIV:
case Opcodes.IREM:
case Opcodes.INEG:
case Opcodes.ISHL:
case Opcodes.ISHR:
case Opcodes.IUSHR:
return Type.INT_TYPE;
case Opcodes.LADD:
case Opcodes.LSUB:
case Opcodes.LMUL:
case Opcodes.LDIV:
case Opcodes.LREM:
case Opcodes.LNEG:
case Opcodes.LSHL:
case Opcodes.LSHR:
case Opcodes.LUSHR:
return Type.LONG_TYPE;
case Opcodes.FADD:
case Opcodes.FSUB:
case Opcodes.FMUL:
case Opcodes.FDIV:
case Opcodes.FREM:
case Opcodes.FNEG:
return Type.FLOAT_TYPE;
case Opcodes.DADD:
case Opcodes.DSUB:
case Opcodes.DMUL:
case Opcodes.DDIV:
case Opcodes.DREM:
case Opcodes.DNEG:
return Type.DOUBLE_TYPE;
default:
throw new Unreachable("Unexpected opcode " + opcode);
}
}
示例2: newOperation
@Override
public BasicValue newOperation(AbstractInsnNode insnNode) throws AnalyzerException {
switch (insnNode.getOpcode()) {
case ICONST_0: return new IntegerConstantBasicValue(Type.INT_TYPE, 0);
case ICONST_1: return new IntegerConstantBasicValue(Type.INT_TYPE, 1);
case ICONST_2: return new IntegerConstantBasicValue(Type.INT_TYPE, 2);
case ICONST_3: return new IntegerConstantBasicValue(Type.INT_TYPE, 3);
case ICONST_4: return new IntegerConstantBasicValue(Type.INT_TYPE, 4);
case ICONST_5: return new IntegerConstantBasicValue(Type.INT_TYPE, 5);
case BIPUSH:
case SIPUSH: return new IntegerConstantBasicValue(Type.INT_TYPE, ((IntInsnNode)insnNode).operand);
case Opcodes.LDC: {
Object constant = ((LdcInsnNode)insnNode).cst;
if (constant instanceof Integer) {
return new IntegerConstantBasicValue(Type.INT_TYPE, (Integer)constant);
} else {
return super.newOperation(insnNode);
}
}
default: return super.newOperation(insnNode);
}
}
示例3: visitVarInsn
@Override
public void visitVarInsn(final int opcode, final int var) {
Type type;
switch (opcode) {
case Opcodes.LLOAD:
case Opcodes.LSTORE:
type = Type.LONG_TYPE;
break;
case Opcodes.DLOAD:
case Opcodes.DSTORE:
type = Type.DOUBLE_TYPE;
break;
case Opcodes.FLOAD:
case Opcodes.FSTORE:
type = Type.FLOAT_TYPE;
break;
case Opcodes.ILOAD:
case Opcodes.ISTORE:
type = Type.INT_TYPE;
break;
default:
// case Opcodes.ALOAD:
// case Opcodes.ASTORE:
// case RET:
type = OBJECT_TYPE;
break;
}
mv.visitVarInsn(opcode, remap(var, type));
}
示例4: getArrayElementTypeForOpcode
private static Type getArrayElementTypeForOpcode(int opcode) {
switch (opcode) {
case Opcodes.IALOAD:
case Opcodes.IASTORE:
return Type.INT_TYPE;
case Opcodes.FALOAD:
case Opcodes.FASTORE:
return Type.FLOAT_TYPE;
case Opcodes.LALOAD:
case Opcodes.LASTORE:
return Type.LONG_TYPE;
case Opcodes.DALOAD:
case Opcodes.DASTORE:
return Type.DOUBLE_TYPE;
case Opcodes.AALOAD:
case Opcodes.AASTORE:
return JarState.NULL_TYPE; // We might not know the type.
case Opcodes.BALOAD:
case Opcodes.BASTORE:
return Type.BYTE_TYPE; // We don't distinguish byte and boolean.
case Opcodes.CALOAD:
case Opcodes.CASTORE:
return Type.CHAR_TYPE;
case Opcodes.SALOAD:
case Opcodes.SASTORE:
return Type.SHORT_TYPE;
default:
throw new Unreachable("Unexpected array opcode " + opcode);
}
}