Method references in annotations?

Neal Gafter neal at
Sat Aug 13 03:59:41 PDT 2011

It's is a bit of a stretch to call it an "omission" that project lambda
hasn't specified language constructs only tangentially related to it's

On Saturday, August 13, 2011, Ben Evans <benjamin.john.evans at>
> On Thu, Aug 11, 2011 at 12:14 AM, Stephen Colebourne
> <scolebourne at>wrote:
>> On 10 August 2011 20:24, Dan Smith <daniel.smith at> wrote:
>> > Discussions along the lines of "yeah, those are things we should get to
>> sometime" have happened here, internally at Oracle, and in the JSR 335
>> expert group.
>> I will just note that I've raised this before. Frameworks in
>> particular constantly have to wrestle with how to handle the lack of
>> method references, generally using strings. Adding method references
>> to the main body of code helps those framework writers a bit, but not
>> being usable in annotations is a major limitation and a huge missed
>> opportunity.
> Nor is this situation static.
> E.g. both JSR 349 (Bean Validation) and JSR 350 (effectively, Container
> Managed State) have glaringly obvious places where a method reference in
> annotation would be very useful.
> Have the reasons for this omission been discussed in detail on the JSR 335
> EG? Is there a public Observers alias for that EG?
> Thanks,
> Ben

More information about the lambda-dev mailing list