Grammar of ConstructorReference

Alex Buckley alex.buckley at oracle.com
Thu Jan 3 15:49:06 PST 2013


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