(AbstractInsnNode insn, InsnValue value)
| 460 | } |
| 461 | |
| 462 | public InsnValue invertValue(AbstractInsnNode insn, InsnValue value) { |
| 463 | Object obj = value.getValue(); |
| 464 | switch (insn.getOpcode()) { |
| 465 | case Opcodes.INEG: |
| 466 | if (obj == null) { |
| 467 | return InsnValue.INT_VALUE; |
| 468 | } |
| 469 | return InsnValue.intValue(-1 * (int) obj); |
| 470 | case Opcodes.LNEG: |
| 471 | if (obj == null) { |
| 472 | return InsnValue.LONG_VALUE; |
| 473 | } |
| 474 | return InsnValue.longValue(-1L * (long) obj); |
| 475 | case Opcodes.FNEG: |
| 476 | if (obj == null) { |
| 477 | return InsnValue.FLOAT_VALUE; |
| 478 | } |
| 479 | return InsnValue.floatValue(-1F * (float) obj); |
| 480 | case Opcodes.DNEG: |
| 481 | if (obj == null) { |
| 482 | return InsnValue.DOUBLE_VALUE; |
| 483 | } |
| 484 | return InsnValue.doubleValue(-1D * (double) obj); |
| 485 | } |
| 486 | |
| 487 | return null; |
| 488 | } |
| 489 | |
| 490 | public InsnValue getStatic(FieldInsnNode fin) { |
| 491 | return new InsnValue(Type.getType(fin.desc)); |
no test coverage detected