diff --git a/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java b/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java
index 6efd240d8af73..0a5c788e2550b 100644
--- a/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java
+++ b/src/java.base/share/classes/java/lang/classfile/ClassBuilder.java
@@ -57,7 +58,7 @@
  * @since 24
  */
 public sealed interface ClassBuilder
-        extends ClassFileBuilder<ClassElement, ClassBuilder>
+        extends ClassFileBuilder<ClassTransform, ClassElement, ClassBuilder>
         permits ChainedClassBuilder, DirectClassBuilder {
 
     /**
@@ -360,4 +361,18 @@ default ClassBuilder withMethodBody(String name,
      * @see MethodTransform
      */
     ClassBuilder transformMethod(MethodModel method, MethodTransform transform);
+
+    /**
+     * @since 25
+     */
+    @Override
+    default ClassBuilder transforming(ClassTransform transform, Consumer<? super ClassBuilder> handler) {
+    }
 }
diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFile.java b/src/java.base/share/classes/java/lang/classfile/ClassFile.java
index 4b529c390993c..1bc55bbc34fd1 100644
--- a/src/java.base/share/classes/java/lang/classfile/ClassFile.java
+++ b/src/java.base/share/classes/java/lang/classfile/ClassFile.java
@@ -680,8 +677,8 @@ default void buildModuleTo(Path path,
      * This is named {@code transformClass} instead of {@code transform} for
      * consistency with {@link ClassBuilder#transformField}, {@link
      * ClassBuilder#transformMethod}, and {@link MethodBuilder#transformCode},
-     * and to distinguish from {@link ClassFileBuilder#transform}, which is
-     * more generic and powerful.
+     * and to distinguish from {@link ClassFileBuilder#transform} and {@link
+     * ClassFileBuilder#transforming}, which are more generic and powerful.
      *
      * @param model the class model to transform
      * @param transform the transform
@@ -704,8 +701,8 @@ default byte[] transformClass(ClassModel model, ClassTransform transform) {
      * This is named {@code transformClass} instead of {@code transform} for
      * consistency with {@link ClassBuilder#transformField}, {@link
      * ClassBuilder#transformMethod}, and {@link MethodBuilder#transformCode},
-     * and to distinguish from {@link ClassFileBuilder#transform}, which is
-     * more generic and powerful.
+     * and to distinguish from {@link ClassFileBuilder#transform} and {@link
+     * ClassFileBuilder#transforming}, which are more generic and powerful.
      *
      * @param model the class model to transform
      * @param newClassName new class name
@@ -736,8 +733,8 @@ default byte[] transformClass(ClassModel model, ClassDesc newClassName, ClassTra
      * This is named {@code transformClass} instead of {@code transform} for
      * consistency with {@link ClassBuilder#transformField}, {@link
      * ClassBuilder#transformMethod}, and {@link MethodBuilder#transformCode},
-     * and to distinguish from {@link ClassFileBuilder#transform}, which is
-     * more generic and powerful.
+     * and to distinguish from {@link ClassFileBuilder#transform} and {@link
+     * ClassFileBuilder#transforming}, which are more generic and powerful.
      *
      * @param model the class model to transform
      * @param newClassName new class name
diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java b/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java
index 172daa83cf862..5b63347d7decf 100644
--- a/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java
+++ b/src/java.base/share/classes/java/lang/classfile/ClassFileBuilder.java
@@ -59,12 +60,13 @@
  *
  * @param <E> the member element type
  * @param <B> the self type of this builder
+ * @param <C> the type of transform that runs on this builder
  * @see CompoundElement
  * @see ClassFileTransform
  * @sealedGraph
  * @since 24
  */
-public sealed interface ClassFileBuilder<E extends ClassFileElement, B extends ClassFileBuilder<E, B>>
+public sealed interface ClassFileBuilder<C extends ClassFileTransform<C, E, B>, E extends ClassFileElement, B extends ClassFileBuilder<C, E, B>>
         extends Consumer<E> permits ClassBuilder, FieldBuilder, MethodBuilder, CodeBuilder {
 
     /**
@@ -106,8 +108,12 @@ default void accept(E e) {
      * well as this builder for building the structure.  The transform is free
      * to preserve, remove, or replace elements as it sees fit.
      * <p>
+     * A {@linkplain #transforming(ClassFileTransform, Consumer) handler-based}
+     * version behaves similarly; the elements built by the handler are passed
+     * instead of elements from an existing structure.
+     * <p>
      * A builder can run multiple transforms against different compound
-     * structures, integrating member elements of different origins.
+     * structures and handlers, integrating member elements of different origins.
      *
      * @apiNote
      * Many subinterfaces have methods like {@link ClassBuilder#transformMethod}
@@ -122,8 +128,15 @@ default void accept(E e) {
      * @param transform the transform to apply
      * @return this builder
      * @see ClassFileTransform
+     * @see #transforming(ClassFileTransform, Consumer)
      */
-    default B transform(CompoundElement<E> model, ClassFileTransform<?, E, B> transform) {
+    default B transform(CompoundElement<E> model, C transform) {
         @SuppressWarnings("unchecked")
         B builder = (B) this;
         var resolved = TransformImpl.resolve(transform, builder);
@@ -132,4 +145,42 @@ default B transform(CompoundElement<E> model, ClassFileTransform<?, E, B> transf
         resolved.endHandler().run();
         return builder;
     }
+
+    /**
+     * Applies a transform to a structure built by a handler, directing results
+     * to this builder.  The builder passed to the handler is initialized with
+     * the same required arguments as this builder.
+     * <p>
+     * The transform will receive each element built by the handler, as well
+     * as this builder for building the structure.  The transform is free
+     * to preserve, remove, or replace elements as it sees fit.
+     * <p>
+     * A {@linkplain #transform(CompoundElement, ClassFileTransform)
+     * structure-based} version behaves similarly; the elements from an existing
+     * source are passed instead of elements built by a handler.
+     * <p>
+     * A builder can run multiple transforms against different compound
+     * structures and handlers, integrating member elements of different origins.
+     *
+     * @apiNote
+     * Many subinterfaces have methods like {@link ClassBuilder#transformMethod}
+     * or {@link MethodBuilder#transformCode}.  However, calling them is
+     * fundamentally different from calling this method: those methods call the
+     * {@code transform} on the child builders instead of on itself.  For
+     * example, {@code classBuilder.transformMethod} calls {@code
+     * methodBuilder.transform} with a new method builder instead of calling
+     * {@code classBuilder.transform} on itself.
+     * <p>
+     * If elements are sourced from a {@link CompoundElement}, the {@linkplain
+     * #transform(CompoundElement, ClassFileTransform) structure-based} version
+     * may be more efficient.
+     *
+     * @param transform the transform to apply
+     * @param handler the handler to produce elements to be transformed
+     * @return this builder
+     * @see ClassFileTransform
+     * @see #transform(CompoundElement, ClassFileTransform)
+     * @since 25
+     */
+    B transforming(C transform, Consumer<? super B> handler);
 }
diff --git a/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java b/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java
index 9126b13bce942..705364aa5ffa8 100644
--- a/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java
+++ b/src/java.base/share/classes/java/lang/classfile/ClassFileTransform.java
@@ -26,14 +26,14 @@
 
 /**
  * A transformation on a {@link CompoundElement} by processing its individual
  * member elements and sending the results to a {@link ClassFileBuilder},
- * through {@link ClassFileBuilder#transform}.  A subtype of {@code
- * ClassFileTransform} is defined for each subtype of {@link CompoundElement}
- * and {@link ClassFileBuilder}, as shown in the sealed class hierarchy below.
+ * through {@link ClassFileBuilder#transform} and {@link
+ * ClassFileBuilder#transforming}.  A subtype of {@code ClassFileTransform} is
+ * defined for each subtype of {@link CompoundElement} and {@link
+ * ClassFileBuilder}, as shown in the sealed class hierarchy below.
  * <p>
  * For example, this is a basic transformation of a {@link CodeModel} that
  * redirects all calls to static methods in the {@code Foo} class to the {@code
@@ -85,8 +85,9 @@
  * transform the method body of select methods in the class it runs on.  This
  * allows users to write small transforms and apply to larger scales.
  * <p>
- * Besides {@link ClassFileBuilder#transform}, there are other methods that
- * accepts a transform conveniently, such as {@link ClassFile#transformClass},
+ * Besides {@link ClassFileBuilder#transform} and {@link
+ * ClassFileBuilder#transforming}, there are other methods that accepts a
+ * transform conveniently, such as {@link ClassFile#transformClass},
  * {@link ClassBuilder#transformField}, {@link ClassBuilder#transformMethod}, or
  * {@link MethodBuilder#transformCode}.  They are convenience methods that suit
  * the majority of transformation scenarios.
@@ -101,7 +102,7 @@
 public sealed interface ClassFileTransform<
         C extends ClassFileTransform<C, E, B>,
         E extends ClassFileElement,
-        B extends ClassFileBuilder<E, B>>
+        B extends ClassFileBuilder<C, E, B>>
         permits ClassTransform, FieldTransform, MethodTransform, CodeTransform {
     /**
      * Transform an element by taking the appropriate actions on the builder.
diff --git a/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java b/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java
index 9eafaa2df9c3a..937ea71fe4c7f 100644
--- a/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java
+++ b/src/java.base/share/classes/java/lang/classfile/CodeBuilder.java
@@ -92,7 +93,7 @@
  * @since 24
  */
 public sealed interface CodeBuilder
-        extends ClassFileBuilder<CodeElement, CodeBuilder>
+        extends ClassFileBuilder<CodeTransform, CodeElement, CodeBuilder>
         permits CodeBuilder.BlockCodeBuilder, ChainedCodeBuilder, TerminalCodeBuilder, NonterminalCodeBuilder {
 
     /**
@@ -150,19 +151,16 @@ public sealed interface CodeBuilder
     int allocateLocal(TypeKind typeKind);
 
     /**
-     * Apply a transform to the code built by a handler, directing results to
-     * this builder.
+     * {@inheritDoc}
      *
-     * @apiNote
-     * This is similar to {@link #transform}, but this does not require the
-     * code elements to be viewed as a {@link CodeModel} first.
-     *
-     * @param transform the transform to apply to the code built by the handler
-     * @param handler the handler that receives a {@link CodeBuilder} to
-     * build the code
-     * @return this builder
-     */
-    default CodeBuilder transforming(CodeTransform transform, Consumer<CodeBuilder> handler) {
+     * @param transform {@inheritDoc}
+     * @param handler {@inheritDoc}
+     * @return {@inheritDoc}
+     */ // remove supertype incorrect since
+    @Override
+    default CodeBuilder transforming(CodeTransform transform, Consumer<? super CodeBuilder> handler) {
+        Objects.requireNonNull(handler);
+        Objects.requireNonNull(transform);
         var resolved = TransformImpl.resolve(transform, this);
         resolved.startHandler().run();
         handler.accept(new ChainedCodeBuilder(this, resolved.consumer()));
diff --git a/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java b/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java
index 477aa6984a238..ea508e5f9fbfa 100644
--- a/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java
+++ b/src/java.base/share/classes/java/lang/classfile/FieldBuilder.java
@@ -32,6 +32,7 @@
 import jdk.internal.classfile.impl.AccessFlagsImpl;
 import jdk.internal.classfile.impl.ChainedFieldBuilder;
 import jdk.internal.classfile.impl.TerminalFieldBuilder;
+import jdk.internal.classfile.impl.TransformImpl;
 
 /**
  * A builder for fields.  The main way to obtain a field builder is via {@link
@@ -48,7 +49,7 @@
  * @since 24
  */
 public sealed interface FieldBuilder
-        extends ClassFileBuilder<FieldElement, FieldBuilder>
+        extends ClassFileBuilder<FieldTransform, FieldElement, FieldBuilder>
         permits TerminalFieldBuilder, ChainedFieldBuilder {
 
     /**
@@ -77,4 +78,17 @@ default FieldBuilder withFlags(AccessFlag... flags) {
         return with(new AccessFlagsImpl(AccessFlag.Location.FIELD, flags));
     }
 
+    // Implementations
+
+    /**
+     * @since 25
+     */
+    @Override
+    default FieldBuilder transforming(FieldTransform transform, Consumer<? super FieldBuilder> handler) {
+    }
 }
diff --git a/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java b/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java
index ff777246fdeb1..b493f35b1c378 100644
--- a/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java
+++ b/src/java.base/share/classes/java/lang/classfile/MethodBuilder.java
@@ -49,7 +50,7 @@
  * @since 24
  */
 public sealed interface MethodBuilder
-        extends ClassFileBuilder<MethodElement, MethodBuilder>
+        extends ClassFileBuilder<MethodTransform, MethodElement, MethodBuilder>
         permits ChainedMethodBuilder, TerminalMethodBuilder {
 
     /**
@@ -106,4 +107,18 @@ default MethodBuilder withFlags(AccessFlag... flags) {
      * @see CodeTransform
      */
     MethodBuilder transformCode(CodeModel code, CodeTransform transform);
+
+    // Implementations
+
+    /**
+     * @since 25
+     */
+    @Override
+    default MethodBuilder transforming(MethodTransform transform, Consumer<? super MethodBuilder> handler) {
+    }
 }
