Problem with nested classes

1,324 views
Skip to first unread message

David Goodenough

unread,
Dec 31, 2009, 1:29:32 PM12/31/09
to Project Lombok
I realise that I am using code based on an not quite up to date
version of the HandleData class, but I have not seen any changes that
seem relevant so I thought I would ask if anyone has seen anything
similar and knows of a fix.

I have some local classes inside an external class, and I get a bunch
of errors. Eclipse reports:-

Multiple markers at this line
- Syntax error, insert ";" to complete ConstructorDeclaration
- Syntax error, insert "Identifier (" to complete
ConstructorHeaderName
- Syntax error, insert ")" to complete ConstructorDeclaration
- Syntax error on token "Village", invalid GenericMethodDeclaration
- Syntax error on token "class", Identifier expected after this token

When I try changing the annotation from Bean to Data, I get:-

Multiple markers at this line
- Syntax error, insert ";" to complete ConstructorDeclaration
- Syntax error, insert ")" to complete ConstructorDeclaration
- Syntax error, insert "Identifier (" to complete
ConstructorHeaderName

The class in question looks like:-

public class Test {
@Bean private class Village {
private String name;
private County county;
}
}

David Goodenough

unread,
Jan 6, 2010, 8:41:26 AM1/6/10
to Project Lombok
Is this (the errors with Data that is) a bug or a restriction?

David

On Dec 31 2009, 6:29 pm, David Goodenough

Reinier Zwitserloot

unread,
Jan 6, 2010, 8:43:46 AM1/6/10
to project-lombok
I can't repeat this issue; if I write:

public class Test {
@Data private class Foo {
    private String name;
    private Object obj;
}
}

in eclipse, lombok does what it should be doing - generates getters, and as a side-effect you get a bunch of warnings involving unused private stuff, but that's intentional. No errors.

--Reinier Zwitserloot



--
You received this message because you are subscribed to the Google
Groups group for http://projectlombok.org/

To post to this group, send email to project...@googlegroups.com
To unsubscribe from this group, send email to
project-lombo...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/project-lombok?hl=en

David Goodenough

unread,
Jan 6, 2010, 9:36:35 AM1/6/10
to Project Lombok
Well that is weird in the extreem. I can not reproduce it either.
Obviously somehow Eclipse had got itself into a mess, and was just
confused and having cleared out the classes and had everything clean
and then reintroducing them has not reproduced the confusion.

David

On Jan 6, 1:43 pm, Reinier Zwitserloot <reini...@gmail.com> wrote:
> I can't repeat this issue; if I write:
>
> public class Test {
> @Data private class Foo {
> private String name;
> private Object obj;
>
> }
> }
>
> in eclipse, lombok does what it should be doing - generates getters, and as
> a side-effect you get a bunch of warnings involving unused private stuff,
> but that's intentional. No errors.
>
> --Reinier Zwitserloot
>
> On Wed, Jan 6, 2010 at 2:41 PM, David Goodenough <
>

> > Groups group forhttp://projectlombok.org/


>
> > To post to this group, send email to project...@googlegroups.com
> > To unsubscribe from this group, send email to

> > project-lombo...@googlegroups.com<project-lombok%2Bunsu...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages