Module-system requirements
mark.reinhold at oracle.com
mark.reinhold at oracle.com
Wed Mar 25 22:51:12 UTC 2015
2015/3/17 6:19 -0700, david.lloyd at redhat.com:
> On 03/16/2015 03:46 PM, mark.reinhold at oracle.com wrote:
>> 2015/3/11 2:46 -0700, david.lloyd at redhat.com:
>>> On 03/11/2015 08:23 AM, David M. Lloyd wrote:
>>>> On 03/09/2015 03:56 PM, mark.reinhold at oracle.com wrote:
>>>>> ...
>>>>>
>>>>> Either way, this use case suggests a new requirement for the Development
>>>>> section:
>>>>>
>>>>> - _Annotation digests_ --- When packaging a module into an artifact it
>>>>> must be possible to augment its definition with a summary of all of
>>>>> the type- and package-level annotations that are present in the
>>>>> module, together with an indication of the types and packages to
>>>>> which each annotation applies. This digest must be easily readable
>>>>> from module artifacts, and at run time those parts of it related to
>>>>> annotations retained for run time must be available through an
>>>>> appropriate reflective API.
>>>>>
>>>>> Comments?
>>>>
>>>> If we're looking to extend this into the domain of Java EE annotations
>>>> (for example), we'd also have to add method and field annotations to the
>>>> list.
>>>
>>> Actually this is not true after all. Other than possibly examining
>>> constructor annotations to decide if a class is a CDI managed bean that is.
>>
>> Do such constructor annotations really need to be in the digest? Or
>> do such classes already carry class-level annotations to indicate
>> that they're to be managed by the CDI framework?
>
> By my understanding, such classes do not need class-level annotations;
> however I must say that the interactions between CDI, the EE platform
> spec, the injection spec, and the common annotations spec are (in my
> opinion) murky at best (and are often the subject of much internal
> debate), so this might be a better question for the Java EE 7 EG.
>
>>>> And SE 8 type annotations might add some strange color to this as
>>>> well.
>>
>> Hrm. I suppose we could summarize all the annotations in a module,
>> regardless of the kinds of elements they're applied to, but is that
>> overkill?
>
> Yeah probably; maybe what is needed is an @Indexed meta-annotation...
Yes, that could be a good approach. I'll mention it as a potential
design in the requirements document.
- Mark
More information about the jpms-spec-observers
mailing list