Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8355658 Allow transforms to run on elements generated by a builder
  3. JDK-8355665

Release Note: `java.lang.classfile.ClassFileBuilder` has Type Variable Declaration Changes

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Withdrawn
    • Icon: P4 P4
    • None
    • 25
    • core-libs

      When `java.lang.classfile.ClassFileBuilder` was added in release 24, it only has two type variables representing the `ClassFileElement` type and its self type.

      In release 25, it has an additional type variable to represent `ClassFileTransform` that integrates with it, so callers no longer need explicitly casts for lambda transforms for `transform(CompoundElement, ClassFileTransform)`, and for the new API `transforming(ClassFileTransform, Consumer)`.

      The usages of parameterized `ClassFileBuilder` can be updated:
        - If the type arguments are not unbounded wildcards, use the concrete subtypes like `CodeBuilder` or `ClassBuilder`;
        - If the type arguments are unbounded wildcards, update to add a new unbounded wildcard argument;
        - If backward compatibility with release 24 is desired, use the raw type `ClassFileBuilder` instead.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: