Record Component attributes

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Oct 9 15:29:41 UTC 2019


These days, deprecation is indicated by an annotation, with the 
DEPRECATED attribute supported as a hangover from when deprecation was 
indication solely by a tag in the javadoc comment.

I suspect the only way to deprecate record components is via 
annotations, so it may not make sense to support the DEPRECATED 
attribute for record components.

-- Jon

On 10/9/19 6:32 AM, Remi Forax wrote:
> Hi all,
> just to be sure, do we agree that a record component can be deprecated, synthetic, have a generic signature, have unknown attributes, have annotation and type annotations ?
>
> so the attributes with a special meaning are
>    SIGNATURE, DEPRECATED, SYNTHETIC, RUNTIME_VISIBLE_ANNOTATIONS, RUNTIME_VISIBLE_TYPE_ANNOTATIONS, RUNTIME_INVISIBLE_ANNOTATIONS and RUNTIME_INVISIBLE_TYPE_ANNOTATIONS.
>
> said differently, it's all the attributes allowed on a field but CONSTANTVALUE which makes no sense on a record component.
>
> regards,
> Rémi


More information about the amber-spec-observers mailing list