Lombok: Add aliases to @Getter @Setter

Created on 15 Jul 2015  Â·  3Comments  Â·  Source: projectlombok/lombok

_Migrated from Google Code (issue 790)_

Most helpful comment

:bust_in_silhouette: [email protected]   :clock8: Feb 19, 2015 at 09:04 UTC

It would be nice to have aliases in @ Getter and @ Setter

In my case it would be handy in multilingual project
For example:

@ Getter(aliases={"ключ"}) private long key;

As a shortcut for:

private long key;

public long getKey() { return key; }

public long ключ() { return key; }

//or maybe like this: (or both) [or configurable]

public long getКлюч() { return key; } // javabean style

//both should work, but its pain to type "getКлюч" changing kb layout every time.

I'm using jruby (multilingual DSL) where both styles accessible as property this way: object.ключ
In groovy only javabean-style accessible as property.

Labels: -Type-Enhancement

All 3 comments

:bust_in_silhouette: [email protected]   :clock8: Feb 19, 2015 at 09:04 UTC

It would be nice to have aliases in @ Getter and @ Setter

In my case it would be handy in multilingual project
For example:

@ Getter(aliases={"ключ"}) private long key;

As a shortcut for:

private long key;

public long getKey() { return key; }

public long ключ() { return key; }

//or maybe like this: (or both) [or configurable]

public long getКлюч() { return key; } // javabean style

//both should work, but its pain to type "getКлюч" changing kb layout every time.

I'm using jruby (multilingual DSL) where both styles accessible as property this way: object.ключ
In groovy only javabean-style accessible as property.

Labels: -Type-Enhancement

:bust_in_silhouette: [email protected]   :clock8: Feb 19, 2015 at 09:12 UTC

Standalone @ Aliases would be handy too for methods

_End of migration_

Was this page helpful?
0 / 5 - 0 ratings