Changes

Jump to navigation Jump to search
25 bytes added ,  11:17, 30 June 2021
=Module Imports=
An alternative solution is to access A Java code classes can also be instantiated by ''importing'' classes them as modules. a module: A new instance of the addressed class will be createdconstructed, which can then be referenced in the query body.
In the (side-effecting) example below, a HashSet instance is created, values are added, and the size of a Java hash the set is returned. The boolean values that are returned by As {{Code|set:add()}} are swallowedreturns boolean values, {{Function|Profiling|prof:void}} is used to swallow the values:
<syntaxhighlight lang="xquery">
</syntaxhighlight>
The execution of imported classes is more efficient than the execution of instances that are have been created at runtime via {{Code|new()}}. A drawback is that In turn, no arguments can be passed on to supplied in the class constructor. As a consequenceimport statement, and the import fails construction will only be successful if the addressed class has no default constructor, but at least one constructor with can be instantiated without arguments.
=Integration=
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu