I don't agree with you, Leon. Imagine this class:
public class A{
@Adder private List<B> b = new ArrayList<B>();
@Adder private List<C> c = new ArrayList<C>();
}
How can you do what @Adder would do using @Delegate?
Anyway, I think that would be useful to accept maps too:
@Adder private Map<A, B> thing = new HashMap<A, B>();
and generates:
public void addThing(A, B) {...}
On Feb 7, 1:53 am, Leon Blakey <
lord.quacks...@gmail.com> wrote:
> This seems like just a smaller version of delegates. And adding
> simplifications of simplifications of common code doesn't make much sense
> to me
>
> 2012/1/31 Vojtěch Knyttl <
vojt...@knyt.tl>
>
>
>
>
>
>
>
> > What about adding some kind of @Adder annotation:
>
> > @Adder
> > protected Set<Performer> performers = new HashSet<Performer>();
>
> > would generate:
>
> > public void addPerformer(Performer object) {
> > performers.add(object);
> > }
>
> > Thanks for considering.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups group forhttp://
projectlombok.org/