Returns the equivalent of the given class file, with the ASM specific instructions replaced with standard ones. This is done with a ClassReader -> ClassWriter round trip. @param classFile a class file containing ASM specific instructions, generated by this ClassWriter. @param hasFrames wheth
(final byte[] classFile, final boolean hasFrames)
| 671 | * ones. |
| 672 | */ |
| 673 | private byte[] replaceAsmInstructions(final byte[] classFile, final boolean hasFrames) { |
| 674 | Attribute[] attributes = getAttributePrototypes(); |
| 675 | firstField = null; |
| 676 | lastField = null; |
| 677 | firstMethod = null; |
| 678 | lastMethod = null; |
| 679 | lastRuntimeVisibleAnnotation = null; |
| 680 | lastRuntimeInvisibleAnnotation = null; |
| 681 | lastRuntimeVisibleTypeAnnotation = null; |
| 682 | lastRuntimeInvisibleTypeAnnotation = null; |
| 683 | moduleWriter = null; |
| 684 | nestHostClassIndex = 0; |
| 685 | numberOfNestMemberClasses = 0; |
| 686 | nestMemberClasses = null; |
| 687 | firstAttribute = null; |
| 688 | compute = hasFrames ? MethodWriter.COMPUTE_INSERTED_FRAMES : MethodWriter.COMPUTE_NOTHING; |
| 689 | new ClassReader(classFile, 0, /* checkClassVersion = */ false) |
| 690 | .accept( |
| 691 | this, |
| 692 | attributes, |
| 693 | (hasFrames ? ClassReader.EXPAND_FRAMES : 0) | ClassReader.EXPAND_ASM_INSNS); |
| 694 | return toByteArray(); |
| 695 | } |
| 696 | |
| 697 | /** |
| 698 | * Returns the prototypes of the attributes used by this class, its fields and its methods. |
no test coverage detected