RFR: 8294982: Implementation of Classfile API [v13]
Adam Sotona
asotona at openjdk.org
Thu Feb 9 08:48:54 UTC 2023
On Wed, 8 Feb 2023 11:16:14 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> `ofSymbols` is an alternative to `of` when conflicting method parameters.
>> In such case `of` refers to CP entries and `ofSymbols` refer to independent symbols describing the objects, like for example `ClassDesc`, `MethodTypeDesc`, `PackageDesc`
>
>> `ofSymbols` is an alternative to `of` when conflicting method parameters. In such case `of` refers to CP entries and `ofSymbols` refer to independent symbols describing the objects, like for example `ClassDesc`, `MethodTypeDesc`, `PackageDesc`
>
> Yes, I was noting that some classes e.g. ModuleProvideInfo do not seem to follow this logic:
>
>
> static ModuleProvideInfo of(ClassEntry provides, ClassEntry... providesWith) { ... }
>
> static ModuleProvideInfo of(ClassDesc provides, List<ClassDesc> providesWith) { ... }
Yes, the alternate `ofSymbols` is used only when there is a conflict, which is not the case of `ModuleProvideInfo` factory methods, there is differentiating first argument.
In case of var-args vs Lists - that is another topic with long history of search for the right balance.
-------------
PR: https://git.openjdk.org/jdk/pull/10982
More information about the build-dev
mailing list