-
Sub-task
-
Resolution: Withdrawn
-
P4
-
None
-
25
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.
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.