Index of annotations
Annotations are used to link Java methods and classes to GAML language.
@action​
This annotation is used to tag a method that will be considered as an action (or primitive) in GAML.
The method must have the following signature: Object methodName(IScope) throws GamaRuntimeException
and be contained in a class annotated with @species or @skill (or a related class, like a subclass or an interface).
This annotation contains:
- name (String): the name of the variable as it can be used in GAML.
- virtual (boolean, false by default): if true the action is virtual, i.e. equivalent to abstract method in java.
- args (set of @arg, empty by default): the list of arguments passed to this action. Each argument is an instance of arg.
- doc (set of @doc, empty by default): the documentation associated to the action.
@arg​
This annotation describes an argument passed to an action.
This annotation contains:
- name (String, "" by default): the name of the argument as it can be used in GAML.
- type (set of ints, empty by default): An array containing the textual representation of the types that can be taken by the argument (see
IType
). - optional (boolean, true by default): whether this argument is optional or not.
- doc (set of @doc, empty by default): the documentation associated to the argument.
@constant​
This annotation is used to annotate fields that are used as constants in GAML.
This annotation contains:
- category (set of Strings, empty by default): an array of strings, each representing a category in which this constant can be classified (for documentation indexes).
- value (String): a string representing the basic keyword for the constant. Does not need to be unique throughout GAML.
- altNames (set of Strings, empty by default): an Array of strings, each representing a possible alternative name for the constant. Does not need to be unique throughout GAML.
- doc (set of @doc, empty by default): the documentation attached to this constant.