The <object> Element

Purpose

The <object> element creates a new object of the class specified by the class attribute.

If a <constructor> child element is present, it will be used to create the new object. Otherwise, Class.newInstance() will be called.

After instantiation, the object may be initialized by applying property settings and method invocations, described by nested <property> and <method> elements.

An <object> element may appear inside <set>, <property> and <arg> elements.

Attributes

NameTypeDescription
class CDATA Required, Dynamic - The class to be instantiated.

Body

The body of the <object> element is defined by the following sequence:

(constructor?,(method|property)*)

Related elements

<set>, <property>, <arg>, <constructor>, <method>