project lombok can do this without cluttering up your code:
http://projectlombok.org/ (disclaimer: I'm a lombok developer). It
works in both eclipse and netbeans (and the command line).

Eclipse has built in support to generate these (in the source menu,
"generate getters/setters"). I'm fairly sure netbeans has something
similar, no plugins required. They do actually stick text in your
source files that you then have to maintain, though, unlike Lombok.

As far as I know none of these generate the 'return this' style
setter, because that style of setter does not adhere to the bean
standard.

On Oct 12, 5:22 pm, Peter A Pilgrim <[email protected]> wrote:
> Hi Everyone
>
> May be even Tor can help.
>
> Has anyone come across a name value pattern plugin for NetBeans or
> Eclipse IDE?
> Given a class like this:
>
> class Node {
>      private float x;
>      private float y;
>      private float z;
>
> }
>
> The plugin generates the accessors and builder chain mutators
>
> class Node {
>      private float x;
>      private float y;
>      private float z;
>
>      public float getX() { return x; }
>      public Node setX( float x ) { this.x = x; return this }
>      public float getY() { return x; }
>      public Node setY( float y ) { this.y = y; return this }
>      public float getZ() { return z; }
>      public Node setZ( float z ) { this.z = z; return this }
>
> }
>
> TIA

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to