FunctionPackage: javatools.jlinkerToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.1
Minimally revised

jdo-call

Arguments: method-ref instance &rest args

This function is associated with the macro jcall. The macro allows compile-time collection of java class names and method signatures. This information is used to generate a file of class and method definitions that may be loaded to initialize an application, and avoid the class and method lookup overhead in the body of the application.

This is the general form for calling Java methods.

If the first argument is a reference to a static method, the second argument is ignored.

If the first argument is a class method, the second argument must be a reference to an instance of an appropriate class.

The remaining arguments must be appropriate references or primitive values.

The last argument may be a result modifier; one of the following keywords that add advice about the value returned.

:copy return a scalar value, or Lisp vector if at all possible.
:ref return a remote reference if that makes sense.
:ignore do not return anything at all.
:one-way do not return anything at all and do not even wait for the answer. (Note: :oneway is also accepted for backward compatibility, but :one-way is preferred.)

This function calls a heuristically determined class method with the given arguments. If a unique method can be selected, then that method is called. Otherwise a continuable error is signaled to allow an appropriate method to be selected.

If the Java code called from Lisp throws an exception, the exception is reflected in Lisp as a Lisp simple-error condition.

The value of the slot excl::format-arguments is a list of the form

(string1 (string2 remote-ref-to-java-error))

It does not make sense to throw on purpose in code called from Lisp since the Java code is executed in a thread dedicated to the handling of calls from Lisp. When the Java code is running, there is no context of interest outside of the called method. That is why all throws are caught by jLinker and returned back to Lisp.

See jlinker.htm for more information on the jLinker facility.


Copyright (c) 1998-2001, Franz Inc. Berkeley, CA., USA. All rights reserved.
Documentation for Allegro CL version 6.1 update # 1. This page has had minimal revisions.
Created 2001.12.15.

ToCDocOverviewCGDocRelNotesIndexPermutedIndex
Allegro CL version 6.1
Minimally revised