vscode-java-code-generator
vscode-java-code-generator copied to clipboard
Does not work with nested, inner class
Plugin version: 7.0.1 Platform: Linux
The wrong ctor is created when trying to create for inner class Product, also the indentation are off, see code below.
Other issues
- I am not able to generate getter, setter,
- wrong equals and hashCode is generated for inner class
- wrong toString generated for inner class
public class Cart {
long id;
long count;
String user;
class Product {
long id;
String name;
String description;
double price;
public Cart(long id, long count, String user) {
this.id = id;
this.count = count;
this.user = user;
}
}
}
Stumbled upon this too, this is an important feature that is lacking. There are a lot of scenarios, e.g., patterns dictated by some widely used APIs that require inner classes to be declared. Not being able to generate constructors in such instances is a major drawback.
ditto