5.4.2.2. Interface
<interface> is a child element of <java_package> and defines the generation of a Java Interface.
Usage
The name attribute is mandatory and defines the name of the interface.
1<code_instruction>
2 ...
3
4 <interface>
5 name=""
6 visibility=""
7 code instruction base
8
9 <generic></generic>
10 <apicommentline></apicommentline>
11 <devcommentline></devcommentline>
12 <import></import>
13 <annotation></annotation>
14 <inherits
15 condition=""
16 foreach="package|object|attribute"
17 package="">
18 </inherits>
19 <field></field>
20 <method></method>
21 </interface>
22
23 ...
24</code_instruction>
Attributes
Name |
Details |
---|---|
name |
The name of the java interface that is made |
visibility |
Visibility of this interface. In practice this is always public |
code instruction base |
Sub elements
Name |
Details |
Number |
---|---|---|
generic |
Makes the interface generic (java 1.5 or higher). |
0 or 1 |
apicommentline |
Javadoc for this interface. |
0 or 1 |
devcommentline |
Commentary that is attached to this interface. |
0 or 1 |
import |
All library elements specified as ‘import’ are translated in the interface as import statements. |
0 or more |
annotation |
Annotation defined for the interface. |
0 or more |
inherits |
The interface from which this interface is derived. |
0 or more |
Those fields contained in this interface. Only static fields are added to the interface. When an field is non-static, only the getters and setters of this attribute are created (depending on the access attribute (rw|ro|wo)). This is a handy way to establish the getters and setters in an interface quickly. |
0 or more |
|
Methods contained in this interface. |
0 or more |