Is there a better standard way to create getters and setters in Java?
It is quite verbose to have to explicitly define getters and setters for each variable. Is ther
I've created some annotations that are not eclipse-specific.
See http://code.google.com/p/javadude/wiki/Annotations
For example:
package sample;
import com.javadude.annotation.Bean;
import com.javadude.annotation.Property;
import com.javadude.annotation.PropertyKind;
@Bean(properties={
@Property(name="name"),
@Property(name="phone", bound=true),
@Property(name="friend", type=Person.class, kind=PropertyKind.LIST)
})
public class Person extends PersonGen {
}
My annotations generate a superclass; I think Lombok modifies the actual class being compiled (which is officially not supported by Sun and may break - I could be wrong about how it works, but based on what I've seen they must be doing that)
Enjoy! -- Scott