| Did you know ... | Search Documentation: |
| Predicate jpl_new/3 |
[det]jpl_new(+X,
+Params, -V)
'java.lang.String''[I' or 'Ljava.lang.String;'class(_,_) or array(_),
e.g. class([java,util],['Date'])If X is an object (non-array) type or descriptor and Params is a list of values or references, then V is the result of an invocation of that type's most specifically-typed constructor to whose respective formal parameters the actual Params are assignable (and assigned).
If X is an array type or descriptor and Params is a list of values or references, each of which is (independently) assignable to the array element type, then V is a new array of as many elements as Params has members, initialised with the respective members of Params.
If X is an array type or descriptor and Params is a non-negative integer N, then V is a new array of that type, with N elements, each initialised to Java's appropriate default value for the type.
If V is literally {Term} then we attempt to
convert a
new org.jpl7.Term instance to a corresponding term; this is
of little obvious use here, but is consistent with jpl_call/4
and jpl_get/3.