Structures and Fields
In order to reference fields and re-use them, GreenLightning convention specifies to use enums for the field type (although any other object could work as well).
The same idea is applied to routes, which are referred to structures inside GreenLighting. To reference a route, we can simply use the enum.
For this tutorial, we need to have two different enums: HelloField
, which will contain the fields we are expecting, and HelloStruct
, which references the two different routes we have.
Edit two files named HelloField
and HelloStruct
the following content:
HelloFields.java
HelloStruct.java