- Timestamp:
- 08/30/10 18:03:37 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/examples/pure-lisp-to-java/lispfunctions.lisp
r12908 r12909 18 18 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 19 20 ; we need to get the 21 ; 1) class (Main) 22 ; 2) classes of the parameters (int) 23 ; 3) method reference (getting that requires the class 24 ; of our object and the classes of the parameters 25 26 ; After that we can invoke the function with jcall, 27 ; giving the method reference, the object and the parameters. 28 ; The result is a lisp object (no need to do jobject-lisp-value), 29 ; unless we invoke the method 30 ; with jcall-raw. 20 ; When the java class is in CLASSPATH, we can invoke its functions with 21 ; for example jstatic. In this example the Main class is to be found 22 ; in CLASSPATH, so we can just use it without having to load it 23 ; separately. 31 24 (defun void-function () 32 25 (let* ((result (jstatic "addTwoNumbers" "Main" 2 4)))
Note: See TracChangeset
for help on using the changeset viewer.