Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Kotlin style properties in Java? #3612

Open
sndcrde opened this issue Feb 20, 2024 · 0 comments
Open

[FEATURE] Kotlin style properties in Java? #3612

sndcrde opened this issue Feb 20, 2024 · 0 comments

Comments

@sndcrde
Copy link

sndcrde commented Feb 20, 2024

Hi,

Am curious if it feasible to develop a Lombok annotation to provide Kotlin-style properties in Java. That is, the dev would normally use the property's name to access it instead of getter/setter methods. But if the dev defines a custom getter/setter method then it will be called while the property is still accessed by its name.

See https://kotlinlang.org/docs/properties.html#getters-and-setters for more info how it's done in Kotlin.

Would be nice to have Kotlin-like properties in Java as they make code clearer and easier to read, removing mundane function calls when really there's no need for them.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant