RFR: JDK-8283730: Improve discussion of modeling of packages and modules
Joseph D. Darcy
joe.darcy at oracle.com
Tue Mar 29 01:30:29 UTC 2022
On 3/28/2022 3:49 PM, Alex Buckley wrote:
> On 3/28/2022 2:38 PM, Joseph D. Darcy wrote:
>> On 3/28/2022 1:05 PM, Alex Buckley wrote:
>>> On 3/28/2022 1:00 PM, Joseph D. Darcy wrote:
>>>> ModuleElement
>>>>
>>>> The represented module may have an explicit backing construct
>>>> (either source code or executable output) or may be created from
>>>> implicit information. The explicit source code construct for a
>>>> module is typically a module-info.java file (JLS 7.7). Implicit
>>>> information is used to model unnamed modules.
>>>
>>> What happened to "automatic modules" per my initial mail???
>>>
>> Update for automatic modules; new plain text:
>>
>> "The represented module may have an explicit backing construct
>> (either source code or executable output) or may be created from
>> implicit information. The explicit source code construct for a module
>> is typically a module-info.java file (JLS 7.7). Implicit information
>> is used to model unnamed modules and automatic modules (JLS 7.7.1)."
>
> It's good that automatic modules are mentioned, though it makes me
> wonder if the `Automatic-Module-Name` attribute of a JAR manifest is
> ever used to determine the `get*Name()` of a ModuleElement? If so,
> that's explicit information, not implicit.
Okay; I added the "standalone" adjective to describe module-info file,
paralleling the wording used to describe package-info and added
"[implicit information] may be used" for for automatic modules:
"The represented module may have an explicit backing construct (either
source code or executable output) or may be created from implicit
information. The explicit and standalone source code construct for a
module is typically a module-info.java file (JLS 7.7). Implicit
information is used to model unnamed modules and may be used for
automatic modules (JLS 7.7.1)."
(I think an explicit module-info.java file has a different degree of
explicitness than an Automatic-Module-Name attribute, but don't think
describing possibilities of Automatic-Module-Name attributes would be
helpful in this context.)
More information about the compiler-dev
mailing list