-
Task
-
Resolution: Done
-
Minor
-
None
-
None
-
None
-
None
Based on Lincoln's comments in https://github.com/windup/windup/pull/147 .
We should standardize the way how to declare the names of Models' properties.
I suggest adding an enum or public inner interface Props.
public interface { public static final String FOO; // or "foo"? Would match the actual value. }
or
public enum Props { ... (constructor - disadvantage) CLASS("class"); }
Probably rather interface, we could share some common properties across otherwise unrelated models.
This
1) will keep the constants in one place,
2) will keep it clear that they are all property names,
3) will prevent verbosity, since users can just type CLASS and the ide will "import static" it.
On the other hand, this is not important at all, just a weekend thought