On Wed, 8 Feb 2023 11:16:14 GMT, Maurizio Cimadamore <mcimadam...@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

Reply via email to