Create an object of the specified class (instance).
1 java.newInstance
<java.newInstance name='name'/>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aname | string | Name of the instance class. |
Returns | |
---|---|
Type | Description |
java.lang.Object | Object of the class. |
Exceptions
attribute 'name' required
The name of the class to instantiate has not been specified.
Example
Declare an object of the Vector class.
Copy
<xsql-script name='java_instance_sample1'> <body> <set name='myvector'> <java.newInstance name='java.util.Vector' /> </set> </body> </xsql-script>
The instance of the Vector class, returned by the function is assigned to the variable of myvector name.