oliviercoma / fluent-builders-generator-eclipse-plugin

Automatically exported from code.google.com/p/fluent-builders-generator-eclipse-plugin
0 stars 0 forks source link

Add ability to build in-place #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to have an option not to seperate building to a builder,
but leaving it in class. like here
http://en.wikipedia.org/wiki/Fluent_interface#Java

and then I would start from 

class Car {

private int year;
private String model;

}

and the expected result is

class Car {

private int year;
private String model;

public Car year(int year) {
    this.year= year;
    return this;
}

public Car make(String make) {
    this.make = make;
    return this;
}

}

of course the prefix should be configurable but not obligatory.

Original issue reported on code.google.com by kretesen...@gmail.com on 17 Mar 2010 at 9:43