AnnotatedExpr suggestion

Werner Dietl wdietl at gmail.com
Fri Jan 4 16:37:17 PST 2013


On Thu, Jan 3, 2013 at 3:42 PM, Jonathan Gibbons
<jonathan.gibbons at oracle.com> wrote:
> Low priority suggestion:
>
> The following in JCNewArray is mildly icky.
>
>
>         public List<JCExpression> dims;
>         // type annotations on dimensions
>         public List<List<JCAnnotation>> dimAnnotations;
>
> Would it make sense to introduce JCAnnotatedExpression so that that reduces
> to
>       public List<JCAnnotatedExpression> dims;

I would find JCAnnotatedExpression confusing. JSR 308 is only about
type annotations and annotations on expressions might at some point be
added.

What kind of expressions are stored in dims? Is there a more specific
type we could use, e.g. are they all JCArrayTypeTree instances?

cu, WMD.

-- 
http://www.google.com/profiles/wdietl


More information about the type-annotations-dev mailing list