Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] Users of at

I don't see what JSR-308 has to do with this. AFAIK, that JSR is only about adding annotations in more places in the code. Lombok is about changing the Java language by adding a preprocessor that participates in the compilation and that can change the structure of generated class files.

Normal annotation processors (including JSR-308-aware) can only add compiler messages to a compilation unit and generate new types, but they can't change an existing type.

For the mentioned problems (generate getters, setters, hashCode, equals, toString), a plain annotation processor would be a more viable solution, since that's fully portable. All of this can be implemented as an annotation processor that generates super- and/or sub-classes for an annotated class, see e.g. . I don't know if any project actually implemented this completely.


From: "Werner Keil" <werner.keil@xxxxxxx>
To: Markus Keller/Zurich/IBM@IBMCH,,
Date: 2012-01-04 17:08
Subject: Re: [] Users of at


Thanks for your concerns,

Are there any aspects of Lombok you mentioned, that JSR-308 (Type Annotations for Java) is not planning to change in different ecosystem but similar way?

I already suggested to Marcel he might want to get in touch with 308 Checkers community and consider working together or contributing to this very understaffed and stuck JCP effort (the JSR is officially inactive since 2007, IBM is also on the EG btw, but I have no clue to what extent they contribute


-------- Original-Nachricht --------
Datum: Wed, 4 Jan 2012 16:26:58 +0100
Von: Markus Keller <markus_keller@xxxxxxxxxx>
Betreff: Re: [] Users of at

> Are there any concerns about using Project Lombok at Eclipse?

Lombok creates an incompatible dialect of the Java language and it modifies the IDE and the compiler in unsupported ways. While the goal sounds noble, Lombok can't be shipped with Eclipse in its current form.

See e.g. and


From: Marcel Bruch <bruch@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: 2012-01-03 23:14
Subject: [] Users of at

Hi there,

before we start: A happy new year!

Little more than a month ago Denis mentioned that this list's purpose is to ask questions related to committer topics. So here is one that bothers me for a while now (hope this list is the right place to ask this question).

I frequently stumble over little annoying things like missing toString methods, boilerplate code for getters and setters, as well as "implementing hashCode" and "equals" etc. Most implementations look the same. For instance, hashCode, toString and equals almost always look as follows in our code:

public int hashCode(){
 return org.apache.commons.lang3.HashCodeBuilder.reflectiveHashCode(this)

public boolean equals(Object other){
 return org.apache.commons.lang3.EqualsBuilder.reflectiveEquals(this,other)

public String toString(){
 return org.apache.commons.lang3.ToStringBuilder.reflectiveToString(this)

Project Lombok aims to assist developers here by using annotations such as
@ToString or @ToString or @EqualsAndHashCode. See the screencast on for more details on it. gives a pretty fast overview of its features. It seems that there is also an integration into Eclipse and into Maven to run the code generation as part of your build. For the IDE Integration Lombok patches the code so that it "sees" the generated methods but does not require you to actually write it in source.

My questions to the list:

Does any project/committer use Project Lombok?
Does any project/committer use Spring Roo (which seems to be "not that far away")?
Are there any concerns about using Project Lombok at Eclipse?


Eclipse Code Recommenders:
_______________________________________________ mailing list

IMPORTANT: Membership in this list is generated by processes internal to the Eclipse Foundation.  To be permanently removed from this list, you must contact
emo@xxxxxxxxxxx to request removal.

NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren:

Back to the top