hg: lambda/lambda/langtools: Added basic support for constructor references.

Paulo Silveira paulo.silveira at gmail.com
Mon Jan 17 10:37:26 PST 2011


2011/1/17 Rémi Forax <forax at univ-mlv.fr>:
> On 01/17/2011 06:56 PM, Brian Goetz wrote:
>> If you mean field references, yes, this was already discussed.  It was
>> decided that this was outside the scope of Lambda.
>>
>> (question for you to think on: what would the type of a field reference
>> be?)
>
> java.lang.Property but that's another story.

why not plain old java.lang.reflect.Field if a new property syntax is
not possible?

thanks

>
> Rémi
>
>>> This  has probably  been discussed already, but since there are
>>> Methods and Constructor references, any chances to have Attribute
>>> references?
>>>
>>> Paulo
>>>
>>> --
>>> Paulo Silveira
>>> Caelum | Ensino e Inovação
>>> www.caelum.com.br
>>> www.arquiteturajava.com.br
>>>
>>>
>>>
>>> 2011/1/17 Rémi Forax<forax at univ-mlv.fr>:
>>>>    Cool !
>>>>
>>>> Rémi
>>>>
>>>> Le 17/01/2011 15:36, maurizio.cimadamore at oracle.com a écrit :
>>>>> Changeset: 9a616df38d88
>>>>> Author:    mcimadamore
>>>>> Date:      2011-01-17 14:34 +0000
>>>>> URL:       http://hg.openjdk.java.net/lambda/lambda/langtools/rev/9a616df38d88
>>>>>
>>>>> Added basic support for constructor references.
>>>>> Syntax is as follows:
>>>>>
>>>>> ClassName [optionalTypeArgs] '#' 'new' [optionalArgs]
>>>>>
>>>>> Examples:
>>>>>
>>>>> Foo#new ->     (*)Foo [most specific constructor]
>>>>> Foo#new() ->     ()Foo
>>>>> Foo#new("Hello!") ->     (String)Foo
>>>>> Foo<String>#new("Hello!") ->     (String)Foo<String>
>>>>>
>>>>> ! src/share/classes/com/sun/tools/javac/comp/Attr.java
>>>>> ! src/share/classes/com/sun/tools/javac/comp/Lower.java
>>>>> ! src/share/classes/com/sun/tools/javac/parser/JavacParser.java
>>>>> + test/tools/javac/lambda/MethodReference17.java
>>>>> + test/tools/javac/lambda/MethodReference18.java
>>>>> + test/tools/javac/lambda/MethodReference19.java
>>>>> + test/tools/javac/lambda/MethodReference20.java
>>>>> + test/tools/javac/lambda/MethodReference20.out
>>>>>
>>>>>
>>>>
>>>>
>
>
>


More information about the lambda-dev mailing list