@Test public void testNewInvokeDynamic() { ClassWriter classWriter = newEmptyClassWriter(); classWriter.newInvokeDynamic("m", "()V", new Handle(Opcodes.H_GETFIELD, "A", "h", "I", false)); String constantPoolDump = getConstantPoolDump(classWriter); assertTrue(constantPoolDump.contains("ConstantInvokeDynamicInfo 0.m()V")); assertTrue( constantPoolDump.contains( "constant_pool: ConstantMethodHandleInfo 1.ConstantFieldRefInfo A.hI")); assertTrue(constantPoolDump.contains("constant_pool: BootstrapMethods")); }
public int newInvokeDynamic( final String name, final String descriptor, final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { return symbolTable.addConstantInvokeDynamic( name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) .index; }
ClassWriter extends ClassVisitor { public int newInvokeDynamic( final String name, final String descriptor, final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { return symbolTable.addConstantInvokeDynamic( name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) .index; } }
ClassWriter extends ClassVisitor { public int newInvokeDynamic( final String name, final String descriptor, final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { return symbolTable.addConstantInvokeDynamic( name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) .index; } ClassWriter(final int flags);  ClassWriter(final ClassReader classReader, final int flags); }
ClassWriter extends ClassVisitor { public int newInvokeDynamic( final String name, final String descriptor, final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { return symbolTable.addConstantInvokeDynamic( name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) .index; } ClassWriter(final int flags);  ClassWriter(final ClassReader classReader, final int flags); @Override final void visit(
      final int version,
      final int access,
      final String name,
      final String signature,
      final String superName,
      final String[] interfaces); @Override final void visitSource(final String file, final String debug); @Override final ModuleVisitor visitModule(
      final String name, final int access, final String version); @Override final void visitNestHost(final String nestHost); @Override final void visitOuterClass(
      final String owner, final String name, final String descriptor); @Override final AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible); @Override final AnnotationVisitor visitTypeAnnotation(
      final int typeRef, final TypePath typePath, final String descriptor, final boolean visible); @Override final void visitAttribute(final Attribute attribute); @Override final void visitNestMember(final String nestMember); @Override final void visitInnerClass(
      final String name, final String outerName, final String innerName, final int access); @Override final FieldVisitor visitField(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final Object value); @Override final MethodVisitor visitMethod(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final String[] exceptions); @Override final void visitEnd(); byte[] toByteArray(); int newConst(final Object value); int newUTF8(final String value); int newClass(final String value); int newMethodType(final String methodDescriptor); int newModule(final String moduleName); int newPackage(final String packageName); @Deprecated int newHandle(
      final int tag, final String owner, final String name, final String descriptor); int newHandle(
      final int tag,
      final String owner,
      final String name,
      final String descriptor,
      final boolean isInterface); int newConstantDynamic(
      final String name,
      final String descriptor,
      final Handle bootstrapMethodHandle,
      final Object... bootstrapMethodArguments); int newInvokeDynamic(
      final String name,
      final String descriptor,
      final Handle bootstrapMethodHandle,
      final Object... bootstrapMethodArguments); int newField(final String owner, final String name, final String descriptor); int newMethod(
      final String owner, final String name, final String descriptor, final boolean isInterface); int newNameType(final String name, final String descriptor); }
ClassWriter extends ClassVisitor { public int newInvokeDynamic( final String name, final String descriptor, final Handle bootstrapMethodHandle, final Object... bootstrapMethodArguments) { return symbolTable.addConstantInvokeDynamic( name, descriptor, bootstrapMethodHandle, bootstrapMethodArguments) .index; } ClassWriter(final int flags);  ClassWriter(final ClassReader classReader, final int flags); @Override final void visit(
      final int version,
      final int access,
      final String name,
      final String signature,
      final String superName,
      final String[] interfaces); @Override final void visitSource(final String file, final String debug); @Override final ModuleVisitor visitModule(
      final String name, final int access, final String version); @Override final void visitNestHost(final String nestHost); @Override final void visitOuterClass(
      final String owner, final String name, final String descriptor); @Override final AnnotationVisitor visitAnnotation(final String descriptor, final boolean visible); @Override final AnnotationVisitor visitTypeAnnotation(
      final int typeRef, final TypePath typePath, final String descriptor, final boolean visible); @Override final void visitAttribute(final Attribute attribute); @Override final void visitNestMember(final String nestMember); @Override final void visitInnerClass(
      final String name, final String outerName, final String innerName, final int access); @Override final FieldVisitor visitField(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final Object value); @Override final MethodVisitor visitMethod(
      final int access,
      final String name,
      final String descriptor,
      final String signature,
      final String[] exceptions); @Override final void visitEnd(); byte[] toByteArray(); int newConst(final Object value); int newUTF8(final String value); int newClass(final String value); int newMethodType(final String methodDescriptor); int newModule(final String moduleName); int newPackage(final String packageName); @Deprecated int newHandle(
      final int tag, final String owner, final String name, final String descriptor); int newHandle(
      final int tag,
      final String owner,
      final String name,
      final String descriptor,
      final boolean isInterface); int newConstantDynamic(
      final String name,
      final String descriptor,
      final Handle bootstrapMethodHandle,
      final Object... bootstrapMethodArguments); int newInvokeDynamic(
      final String name,
      final String descriptor,
      final Handle bootstrapMethodHandle,
      final Object... bootstrapMethodArguments); int newField(final String owner, final String name, final String descriptor); int newMethod(
      final String owner, final String name, final String descriptor, final boolean isInterface); int newNameType(final String name, final String descriptor); static final int COMPUTE_MAXS; static final int COMPUTE_FRAMES; }