Better encapsulation for AnnotatedType
jonathan.gibbons at oracle.com
Thu Sep 19 19:30:11 PDT 2013
On 09/15/2013 12:53 AM, Werner Dietl wrote:
> Regarding SymbolMetadata, I find it a bit strange that the methods that
> access SymbolMetadata in Symbol are still called "xxxAnnotations", e.g.
> Should these also be renamed?
Yes, this method should be renamed, preferably sooner rather than later.
It looks like initedAnnos should be renamed to initedMetadata as well.
(I don't think we need the longer form initedSymbolMetadata, given the
protected SymbolMetadata annotations;
should be renamed to
protected SymbolMetadata metadata;
This renaming should be done as a patch to tl/langtools.
To be clear on where we are trying to go with the naming, the intent is
to use "metadata" for all metadata; "annotations" are a particular kind
of metadata. Although annotations are currently the only kind of
metadata on a symbol, the distinction is more obvious on Type, where
constant values are another kind of metadata on Type. Thus TypeMetadata
will contain constant values and type annotations.
More information about the type-annotations-dev