AnnotatedExpr suggestion

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Jan 4 16:56:25 PST 2013


Good point -- then the suggested name is wrong.

Maybe a better suggestion would be JCDimension, which contains a 
List<JCAnnotation> (for the annotations of that dimension) and a 
JCExpression (for the "size" of that dimension).  Then JCNewArray would 
have a List<JCDimension>.

-- Jon

On 01/04/2013 04:37 PM, Werner Dietl wrote:
> 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.
>



More information about the type-annotations-dev mailing list