01_user_documentation:07_rgg_xl:02_xl:08_object:01_module:01_declaration
This is an old revision of the document!
Table of Contents
Declaration
Modules are declared similarly as classes. Their declaration include:
- A name
- An optional list of attribute
- An optional list of class/interfaces that are extended/ implemented
Modules are declared in XL with the keyword module (different from the java keyword module).
module A(int attr1, Object attr2) extends N { /* body */ } ==> ;
Syntax
Only the Name is non optional in the declaration. Thus, the smallest module declaration is:
module A;
This declaration is equivalent to:
class A extends N { }
The declaration uses an implicit superclass N which is determined by the annotation @DefaultModuleSuperclass of the innermost enclosing declaration which has such an annotation. RGG files have default annotations, one of these is the @DefaultModuleSuperclass. Its value is Node.
Attributes
A list of typed arguments can follow the Name. This list is used as declaration of the attributes of the module.
Implicit declaration
01_user_documentation/07_rgg_xl/02_xl/08_object/01_module/01_declaration.1756991729.txt.gz · Last modified: 2025/09/04 15:15 by gaetan
