RFR: 8352536: Add overloads to parse and build class files from/to MemorySegment [v3]
Adam Sotona
asotona at openjdk.org
Thu Mar 27 14:59:26 UTC 2025
On Tue, 25 Mar 2025 15:27:05 GMT, David M. Lloyd <duke at openjdk.org> wrote:
>> Provide method overloads to the ClassFile interface of the java.lang.classfile API which allow parsing of classes found in memory segments, as well as allowing built class files to be output to them.
>
> David M. Lloyd has updated the pull request incrementally with two additional commits since the last revision:
>
> - Shorten method names
> - Minor doc adjustment
I'm sorry, but I'm still missing the benefits part of this change.
The costs are high. The API grows, implementation splits into multiple parallel branches in ClassFileImpl and DirectClassBuilder.
A new implementation class BuildAndParseBuffersAndSegments appears.
Parallel implementations add a new dimension to the test coverage matrix.
There is also still a lot of code related to ByteBuffer.
I'm not convinced the API should be extended with the MemorySegment overrides.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24139#issuecomment-2758372702
More information about the core-libs-dev
mailing list