Grammar of ConstructorReference

Dan Smith daniel.smith at oracle.com
Fri Jan 4 13:46:47 PST 2013


I have conveniently avoided Chapter 18 (because it requires a global expertise in the Ch. 18 grammar and its invariants, which I do not have).  We can keep this in mind when we get around to it...

—Dan

On Jan 3, 2013, at 4:49 PM, Alex Buckley <alex.buckley at oracle.com> wrote:

> The grammar of ConstructorReference is:
> 
> ConstructorReference:
> ClassType '::' NonWildTypeArgumentsopt 'new'
> ArrayType '::' 'new'
> 
> The class or array type which appears before the '::' is a first-class type use on which JSR 308 would like to allow annotations. JSR 308 usually catches type uses by redefining ReferenceType in JLS ch.18 from:
> 
> ReferenceType:
> Identifier [TypeArguments] { . Identifier [TypeArguments] }
> 
> to:
> 
> ReferenceType:
> [Annotations] UnannReferenceType
> 
> UnannReferenceType:
> Identifier [TypeArguments] {. [Annotations] Identifier [TypeArguments]}
> 
> My question to the 335 EG then is, what is the ch.18 version of ConstructorReference? If it uses ReferenceType, 308 is good to go.
> 
> Alex



More information about the lambda-spec-comments mailing list