In the Source view, you create an imported type using a <type>
element. There is a containing element called <import> that contains
all the imported types in the macro script, and there is a <type>
element for each imported type. Imported type and variable of that
type shows
an <import> element that declares an imported type, followed by
a <vars> element that creates and initializes a variable belonging
to the imported type:
Figure 1. Imported type and variable of that
type
In the figure above the <import> element contains one <type>
element, which has a class attribute
(containing the fully qualified class name, java.util.Hashtable)
and a name attribute (containing the
short name, Hashtable). The <vars> element contains
one <create> element, which as usual specifies a name ($ht$),
a type (Hashtable), and an initial value (which here is
not null but rather is a call to a constructor that returns
an instance of the class, $new Hashtable(40)$).
If you are using the source view, you must put all imported types
(<type> elements) inside the <import> element. The <import>
element itself must appear inside the <HAScript> element (see <HAScript> element) and before the <vars> element.
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.