lishunli / projectlombok

Automatically exported from code.google.com/p/projectlombok
0 stars 0 forks source link

Would like an @Fluent annotation #441

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be nice to have an @Fluent annotation at the class level which would 
generate fluent api methods for all the same fields for which getter methods 
would be generated:

@Data @Fluent
public class Foo {
  private String bar;
}

==>

public class Foo {
   public void setBar(String bar) { this.bar = bar; }
   public String getBar() { return this.bar; }
   public Foo withBar(String bar) { this.bar = bar; return this; }
}

I'm willing to help if you can give me some pointers on where in the source i 
would add the appropriate handlers for this.

Original issue reported on code.google.com by mattin...@gmail.com on 9 Jan 2013 at 3:28

GoogleCodeExporter commented 9 years ago
Have you already considered using:
http://projectlombok.org/features/experimental/Accessors.html?

Original comment by grootj...@gmail.com on 9 Jan 2013 at 4:17