On Tue, 7 Feb 2023 11:48:28 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> There are at least 72 usages of AttributedElement.Kind across the Classfile 
>> API.
>> Do you suggest to rename it to something else (for example Location)?
>
> Uhm - I can't see these usages... something seems to be off with my IDE 
> configuration. I did a grep and I now saw the uses. That said, having the 
> Kind/Location inside AttributedElement still looks weird to me. The "places 
> where an attribute can appear" is a property of an `Attribute`, not of an 
> attributed element (which is used to model elements which can have 
> attributes).

`AttributedElement::attributedElementKind` identifies the one kind of the 
attributes holder.
The "places where an attribute can appear" is available through 
`AttributeMapper::whereApplicable` and matched against 
`AttributedElement::attributedElementKind`.
We may consider to hide or remove this auxiliary method, as 
`AttributedElement::attributedElementKind` might be computed from the 
ClassfileElement instance type.

-------------

PR: https://git.openjdk.org/jdk/pull/10982

Reply via email to