Module java.base
Package java.lang.classfile

# Interface ClassTransform

≠
@FunctionalInterface
public abstract interface ClassTransform
extends java.lang.classfile.ClassFileTransform<java.lang.classfile.ClassTransform, java.lang.classfile.ClassElement, java.lang.classfile.ClassBuilder>
Comparing jdk-master and valhalla-csr-open

All Superinterfaces:
  `ClassFileTransform<ClassTransform, ClassElementPREVIEW , ClassBuilder>`

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public non-sealed interface ClassTransform extends ClassFileTransform<ClassTransform, ClassElementPREVIEW , ClassBuilder>
A transformation on streams of `ClassElement` PREVIEW .

Refer to `ClassFileTransform` for general guidance and caution around the use of transforms for structures in the `class` file format.

Since:
  24
See Also:
  - `ClassModel`
  - `ClassFile.transformClass(ClassModel, ClassTransform)`

## Fields

- =
  public static final java.lang.classfile.ClassTransform ACCEPT_ALL

## Methods

- ≠
  public default java.lang.classfile.ClassTransform andThen(java.lang.classfile.ClassTransform arg0)
  Comparing jdk-master and valhalla-csr-open

  ### andThen

  default ClassTransform andThen (ClassTransform t)
  Description copied from interface: `ClassFileTransform`
  Chain this transform with another; elements presented to the builder of this transform will become the input to the next transform.

  This method is implemented by the Class-File API. Users usually don't have sufficient access to Class-File API functionalities to override this method correctly for generic downstream transforms.

  Specified by:
    `andThen` in interface `ClassFileTransform<ClassTransform, ClassElementPREVIEW , ClassBuilder>`
  Implementation Requirements:
    The default implementation returns this class transform chained with another class transform from the argument. Chaining of two transforms requires to involve a chained builder serving as a target builder for this transform and also as a source of elements for the downstream transform.
  Parameters:
    `t` - the downstream transform
  Returns:
    the chained transform
- ≠
  public static java.lang.classfile.ClassTransform dropping(java.util.function.Predicate<java.lang.classfile.ClassElement> arg0)
  Comparing jdk-master and valhalla-csr-open

  ### dropping

  static ClassTransform dropping (Predicate<ClassElementPREVIEW > filter)
  Creates a class transform that passes each element through to the builder, except for those that the supplied `Predicate` returns true for.
  Parameters:
    `filter` - the predicate that determines which elements to drop
  Returns:
    the class transform
- =
  public static java.lang.classfile.ClassTransform endHandler(java.util.function.Consumer<java.lang.classfile.ClassBuilder> arg0)
- =
  public static java.lang.classfile.ClassTransform ofStateful(java.util.function.Supplier<java.lang.classfile.ClassTransform> arg0)
- =
  public static java.lang.classfile.ClassTransform transformingFields(java.lang.classfile.FieldTransform arg0)
- =
  public static java.lang.classfile.ClassTransform transformingMethodBodies(java.lang.classfile.CodeTransform arg0)
- =
  public static java.lang.classfile.ClassTransform transformingMethodBodies(java.util.function.Predicate<java.lang.classfile.MethodModel> arg0, java.lang.classfile.CodeTransform arg1)
- =
  public static java.lang.classfile.ClassTransform transformingMethods(java.lang.classfile.MethodTransform arg0)
- =
  public static java.lang.classfile.ClassTransform transformingMethods(java.util.function.Predicate<java.lang.classfile.MethodModel> arg0, java.lang.classfile.MethodTransform arg1)

## Summary

Differences
| Elements | Comments | Descriptions | Total
Added | Changed | Removed | Added | Changed | Removed | Added | Changed | Removed
--- | --- | --- | --- | --- | --- | --- | --- | ---
ClassTransform |  |  |  |  |  |  | 3 |  |  | 3
andThen(ClassTransform) |  |  |  |  |  |  | 1 |  |  | 1
dropping(Predicate) |  |  |  |  |  |  | 1 |  |  | 1
Total |  |  |  |  |  |  | 5 |  |  | 5