Feature Overview
This feature generates constructors.
This feature generates constructors.
None
@constructor
public class ConstructorDemo {
private String name;
private Integer age;
}
public class ConstructorDemo {
private String name;
private Integer age;
public ConstructorDemo() {
}
public ConstructorDemo(String name, Integer age) {
this.name = name;
this.age = age;
}
}
@constructor
only includes non-static fields.
Some variations are:
Example | Description |
---|---|
@constructor | Generate all non-static fields |
@constructor({ 'name', 'id' }) | Generate the given fields |
@constructor(fields={ 'name', 'id' }) | Generate the given fields |
Contribute on Github! Edit this section.