Did you know? About the nifty drawing program pceDrawSearch Documentation:
SWI-Prolog owl logojpl.pl
PublicShow source
jpl_get(+X, +Fspec, -V)
X can be:
  • a classname, a descriptor, or an (object or array) type (for static fields);
  • a non-array object (for static and non-static fields)
  • an array (for 'length' pseudo field, or indexed element retrieval), but not:
  • a String (clashes with class name; anyway, String has no fields to retrieve)

Fspec can be:

  • an atomic field name,
  • or an integral array index (to get an element from an array,
  • or a pair I-J of integers (to get a subrange (slice?) of an array)

finally, an attempt will be made to unify V with the retrieved value

jpl_new(+X, +Params, -V)
X can be:
  • an atomic classname e.g. 'java.lang.String'
  • an atomic descriptor e.g. '[I' or 'Ljava.lang.String;'
  • a suitable type i.e. any class(_,_) or array(_)

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 {Term} then we attempt to convert a new jpl.Term instance to a corresponding term; this is of little obvious use here, but is consistent with jpl_call/4 and jpl_get/3

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

jpl_is_class(Arg1)
jpl_is_false(Arg1)
jpl_is_null(Arg1)
jpl_is_object(Arg1)
jpl_datum_to_type(Arg1, Arg2)
jpl_classname_to_type(Arg1, Arg2)
jpl_set_element(Arg1, Arg2)
jpl_false(Arg1)
jpl_classname_to_class(Arg1, Arg2)
jpl_map_element(Arg1, Arg2)
jpl_class_to_type(Arg1, Arg2)
jpl_call(Arg1, Arg2, Arg3, Arg4)
jpl_terms_to_array(Arg1, Arg2)
jpl_class_to_classname(Arg1, Arg2)
jpl_list_to_array(Arg1, Arg2)
jpl_servlet_byref(Arg1, Arg2, Arg3)
jpl_iterator_element(Arg1, Arg2)
jpl_servlet_byval(Arg1, Arg2, Arg3)
jpl_hashtable_pair(Arg1, Arg2)
jpl_enumeration_to_list(Arg1, Arg2)
jpl_set(Arg1, Arg2, Arg3)
jpl_enumeration_element(Arg1, Arg2)
jpl_datums_to_array(Arg1, Arg2)
jpl_array_to_list(Arg1, Arg2)
jpl_set_default_jvm_opts(Arg1)
jpl_array_to_length(Arg1, Arg2)
jpl_void(Arg1)
jpl_get_actual_jvm_opts(Arg1)
jpl_pl_lib_version(Arg1)
jpl_type_to_classname(Arg1, Arg2)
jpl_c_lib_version(Arg1)
jpl_primitive_type(Arg1)
jpl_type_to_class(Arg1, Arg2)
jpl_ref_to_type(Arg1, Arg2)
jpl_true(Arg1)
jpl_get_default_jvm_opts(Arg1)
jpl_is_void(Arg1)
jpl_object_to_type(Arg1, Arg2)
jpl_null(Arg1)
jpl_object_to_class(Arg1, Arg2)
jpl_is_object_type(Arg1)
jpl_is_ref(Arg1)
jpl_is_true(Arg1)
jpl_is_type(Arg1)