Serialization
Mark Thornton
mthornton at optrak.co.uk
Wed Dec 16 01:37:03 PST 2009
Alex Blewitt wrote:
> On Wed, Dec 16, 2009 at 9:06 AM, Peter Levart <peter.levart at marand.si> wrote:
>
>> For the "name" part, maybe alternative is specifying it directly in the lambda expression like this:
>>
>> #int(int, int) plus = #(int a, int b) a+b; // produces annonymous class name, sensitive to position in source
>>
>
> I don't see that the name is at all relevant, since the name is part
> of the variable that it gets assigned to and not an intrinsic property
> of the lambda itself.
>
>
The name of an anonymous class is something like ContainingClass$<i>
where <i> is its index in the anonymous classes generated for that
container. So declaring another anonymous class changes the name of all
anonymous classes appearing later in the source.
Mark Thornton
More information about the lambda-dev
mailing list