vscode-java-code-generator icon indicating copy to clipboard operation
vscode-java-code-generator copied to clipboard

Getters and fluent setters only

Open nickel-bert opened this issue 3 years ago • 0 comments

I would like to have the possibility to generate getters and fluent setters - but NO "normal" setters. Furthermore, the method names of the fluent setters should conform to the JavaBeans Naming Conventions. I don't want two different kind of setters.

Or is this already possible and I simply failed badly at adapting the configuration settings properly? Thanks in advance!

Example:

public class Whatever {

   private String propertyA;
   
   public String getPropertyA() {
       return propertyA;
   }
   
   public Whatever setPropertyA(String propertyA) {
       this.propertyA = propertyA;
       return this;
   }

}

nickel-bert avatar Apr 26 '21 15:04 nickel-bert