Uses of Interface java.lang.classfile.CodeTransform (Java SE 22 & JDK 22)
Description: use: module: java.base, package: java.lang.classfile, interface: CodeTransform

# Uses of Interface
java.lang.classfile.CodeTransform

Packages that use CodeTransformPREVIEW
Package
Description
java.lang.classfile
Provides classfile parsing, generation, and transformation library.
java.lang.classfile.components
Provides specific components, transformations, and tools built on top of the `java.lang.classfile`PREVIEW library.

- ## Uses of CodeTransformPREVIEW in java.lang.classfilePREVIEW

  Fields in java.lang.classfilePREVIEW declared as CodeTransformPREVIEW
  Modifier and Type
  Field
  Description
  `static final CodeTransformPREVIEW`
  CodeTransform.`ACCEPT_ALL`
  A code transform that sends all elements to the builder.
  Methods in java.lang.classfilePREVIEW that return CodeTransformPREVIEW
  Modifier and Type
  Method
  Description
  `default CodeTransformPREVIEW`
  CodeTransform.`andThen(CodeTransformPREVIEW t)`
  `static CodeTransformPREVIEW`
  CodeTransform.`endHandler(Consumer<CodeBuilderPREVIEW> finisher)`
  Create a code transform that passes each element through to the builder, and calls the specified function when transformation is complete.
  `static CodeTransformPREVIEW`
  CodeTransform.`ofStateful(Supplier<CodeTransformPREVIEW> supplier)`
  Create a stateful code transform from a `Supplier`.
  Methods in java.lang.classfilePREVIEW with parameters of type CodeTransformPREVIEW
  Modifier and Type
  Method
  Description
  `default CodeTransformPREVIEW`
  CodeTransform.`andThen(CodeTransformPREVIEW t)`
  `MethodBuilderPREVIEW`
  MethodBuilder.`transformCode(CodeModelPREVIEW code, CodeTransformPREVIEW transform)`
  Build the method body for this method by transforming the body of another method.
  `default CodeBuilderPREVIEW`
  CodeBuilder.`transforming(CodeTransformPREVIEW transform, Consumer<CodeBuilderPREVIEW> handler)`
  Apply a transform to the code built by a handler, directing results to this builder.
  `static MethodTransformPREVIEW`
  MethodTransform.`transformingCode(CodeTransformPREVIEW xform)`
  Create a method transform that transforms `CodeModel`PREVIEW elements with the supplied code transform.
  `static ClassTransformPREVIEW`
  ClassTransform.`transformingMethodBodies(CodeTransformPREVIEW xform)`
  Create a class transform that transforms the `CodeAttribute`PREVIEW (method body) of `MethodModel`PREVIEW elements with the supplied code transform.
  `static ClassTransformPREVIEW`
  ClassTransform.`transformingMethodBodies(Predicate<MethodModelPREVIEW> filter, CodeTransformPREVIEW xform)`
  Create a class transform that transforms the `CodeAttribute`PREVIEW (method body) of `MethodModel`PREVIEW elements with the supplied code transform.
  Method parameters in java.lang.classfilePREVIEW with type arguments of type CodeTransformPREVIEW
  Modifier and Type
  Method
  Description
  `static CodeTransformPREVIEW`
  CodeTransform.`ofStateful(Supplier<CodeTransformPREVIEW> supplier)`
  Create a stateful code transform from a `Supplier`.

- ## Uses of CodeTransformPREVIEW in java.lang.classfile.componentsPREVIEW

  Subinterfaces of CodeTransformPREVIEW in java.lang.classfile.componentsPREVIEW
  Modifier and Type
  Interface
  Description
  `interface`
  `CodeLocalsShifterPREVIEW`
  Preview.
  `CodeLocalsShifter`PREVIEW is a `CodeTransform`PREVIEW shifting locals to newly allocated positions to avoid conflicts during code injection.
  `interface`
  `CodeRelabelerPREVIEW`
  Preview.
  A code relabeler is a `CodeTransform`PREVIEW replacing all occurrences of `Label`PREVIEW in the transformed code with new instances.
  `interface`
  `CodeStackTrackerPREVIEW`
  Preview.
  `CodeStackTracker`PREVIEW is a `CodeTransform`PREVIEW tracking stack content and calculating max stack size.
  Methods in java.lang.classfile.componentsPREVIEW that return CodeTransformPREVIEW
  Modifier and Type
  Method
  Description
  `CodeTransformPREVIEW`
  ClassRemapper.`asCodeTransform()`
  Returns this `ClassRemapper` as `CodeTransform`PREVIEW instance.