Project Lombok does this via annotations that can be added to the Java class for which common methods are desired. Most of the annotations are self-descriptive in their names: @Getter, @Setter, ...