../../_images/Revised.png

4.4.2.6. Import

Using <import> is the way to add import statements to a Java class or interface. Inside a code instruction this element can be a child of <method> or <field>. Defining imports on an method (or field) rather than the parent class has the advantage that the import lines are only added when that method is actually generated, and not when the condition attribute of the method returns false. Zero or more import elements can be used.

Usage

Listing 4.35 Syntax
1
2
3
4
5
6
7
<import>
        name="apenootjes"
        foreach="package|object"
        condition=""
        package=""
        object=""
</import>

Attributes

Table 4.44 attributes of <import/>

Name

Details

name

Name of the class to be imported

code instruction base

Loupe S Code instruction base.