-
Notifications
You must be signed in to change notification settings - Fork 0
Alphabet Annotations
These are the annotations which can be used to set details about the alphabet of the experiment. Below all annotations are quickly explained together with a few small examples. More details about these annotations can be found in their respective JavaDoc.
Currently, all primitives and strings are allowed as parameters. Furthermore, we have a specific set of JavaFX parameters. Examples of parameters are: int:5, string:some_string, char:v and javaFX:mouse_press.
The FunctionSymbol annotation is used to create a new input symbol for this function. If no outputID is specified, the output of the function will be captured.
@FunctionSymbol(symbolID = "FooFunction", predicates = {"PredicateA"})
public int foo() {
// some code
}
The FieldMethodSymbol annotation is used to create input symbols for methods which could be executed on this field. For example, if you have got a field 'Button b' in your class, you can annotate it with this annotation and create an input symbol for methods executable on this field such as setVisible(boolean).
@FieldMethodSymbol(fieldID = "Game", fieldMethods = {"giveTokens(int)"},
parameters = "int:10", outputIDs = "output")
public Game game;
The WidgetSymbol annotation is used to create input symbols for events which could be handled by this widget. Currently all widgets extending javafx.scene.Node and implementing the event handler interface are supported. The supported events are: "mouse_drag_detect", "mouse_click", "mouse_drag", "mouse_enter", "mouse_exit", "mouse_move", "mouse_press" and "mouse_release", When you work with WidgetSymbols, please make sure to have the widgetNFA.jff file in the same folder as your checkers.xml file. The widgetNFA.jff file can be found in the resource folder of the HermieLab project.
@WidgetSymbol(widgetID = "button", events = {"mouse_press","mouse_release"},
outputIDs = {"output","output"})
public Button rhythmButton;
The OutputFunction annotation is used to create a new output function which can be referenced in a symbol.
@OutputFunction(ID = "Foo")
public String foo() {
//code
}
The OutputFieldMethod annotation is used to create a new output function which can be referenced in a symbol.
@OutputFieldMethod(ID = "Foo", fieldMethod = "getFoo")
public Foo screen;