Nope; lombok injects those methods well before the latter stages of
the error finding process runs - which is where problematic typing
relations, such as missing methods that you ought to implement due to
an interface, are found. It's just like using "getFoo();" in your own
method when getFoo() is being generated by lombok. Just works. Lombok
isn't an annotation processor - it uses annotation processing (or, on
eclipse, a javaagent) to hack javac/eclipse and insert itself in
between the AST tree builder and everything else javac/eclipse does.
Such as error checks, compilation, building auto-complete dialogs, the
overview window, and even search features such as 'find declaration'.

Not much need for a factory, I think; you might as well do:

@Delegate
private List list = MyListFactory.getInstance().createList(this);

or some such.

On Aug 27, 3:44 am, Mark Derricutt <m...@talios.com> wrote:
> Without being abstract, and without IDE support this would throw errors as
> the class/source doesn't implement the List interface, but lombok could (if
> possible) drop the abstract bytecode marker, and use an implementation
> mentioned in the annotation.
>
> public abstract class Something extends Whatever implements List {
>   @Delegate(implementation=MyList.class)
>   private List list;
>
> }
>
> And maybe from a factory to give some runtime mixin flexability...
>
> public abstract class Something extends Whatever implements List {
>   @Delegate(implementationFactory=MyListFactory.class)
>   private List list;
>
> }
>
> --
> Pull me down under...
>
> On Thu, Aug 27, 2009 at 11:17 AM, Reinier Zwitserloot 
> <reini...@gmail.com>wrote:
>
>
>
> > Simple.
>
> > public class Something extends Whatever implements List {
> >    private @Delegate List listDelegate = new ArrayList();
> > }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to javaposse@googlegroups.com
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to