Package dev.runabout.annotations
Annotation Type RunaboutEnabled
-
@Documented @Target(CONSTRUCTOR) @Retention(RUNTIME) public @interface RunaboutEnabledAnnotation for a constructor to build aRunaboutInputfrom. Runabout will serialize fields from the class and pass them into the annotated constructor.
This annotation must be used in conjunction with theRunaboutParameterannotation on all parameters in the constructor signature. Each parameter annotation will contain a string which is the name of the field from the class which should be used to populate the parameter.
For example:In the above example, the RunaboutService will serialize this class into a RunaboutInput by serializing the field "name" and passing in the RunaboutInput's eval string in as parameter "text". The same will be done for the field "age" and parameter "number".
class Example {
final String name;
final int age;
Example(@RunaboutParameter("name") String text, @RunaboutParameter("age") int number) {
this.name = text;
this.age = number;
}