Visits a LDC instruction. Note that new constant types may be added in future versions of the Java Virtual Machine. To easily detect new constant types, implementations of this method should check for unexpected constant types, like this: if (cst instanceof Integer) { // ... } else if (cs
(final Object value)
| 538 | * dynamic for classes whose version is 55. |
| 539 | */ |
| 540 | public void visitLdcInsn(final Object value) { |
| 541 | if (api < Opcodes.ASM5 |
| 542 | && (value instanceof Handle |
| 543 | || (value instanceof Type && ((Type) value).getSort() == Type.METHOD))) { |
| 544 | throw new UnsupportedOperationException(REQUIRES_ASM5); |
| 545 | } |
| 546 | if (api != Opcodes.ASM7_EXPERIMENTAL && value instanceof ConstantDynamic) { |
| 547 | throw new UnsupportedOperationException("This feature requires ASM7"); |
| 548 | } |
| 549 | if (mv != null) { |
| 550 | mv.visitLdcInsn(value); |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | /** |
| 555 | * Visits an IINC instruction. |