Default Attribute Values
Attributes (but not associations) can be initialized with a default value.
This is possible using the @InitialValue
annotation, which takes a string representing a Java expression.
src/gen/java/org/fulib/docs/GenModel.java
:
@InitialValue("\"P1\"")
String label;
@InitialValue("100")
int score;
src/main/java/org/fulib/docs/Player.java
:
private String label = "P1";
private int score = 100;