source: tags/1.5.0/doc/manual/java.tex

Last change on this file was 15042, checked in by Mark Evenson, 7 years ago

abcl-1.5.0-rc-0: drop support for Java 5

Initial documentation and metadata update for ABCL 1.5.0.

File size: 26.0 KB
Line 
1\paragraph{}
2\label{JAVA:*JAVA-OBJECT-TO-STRING-LENGTH*}
3\index{*JAVA-OBJECT-TO-STRING-LENGTH*}
4--- Variable: \textbf{*java-object-to-string-length*} [\textbf{java}] \textit{}
5
6\begin{adjustwidth}{5em}{5em}
7Length to truncate toString() PRINT-OBJECT output for an otherwise unspecialized JAVA-OBJECT.  Can be set to NIL to indicate no limit.
8\end{adjustwidth}
9
10\paragraph{}
11\label{JAVA:+FALSE+}
12\index{+FALSE+}
13--- Variable: \textbf{+false+} [\textbf{java}] \textit{}
14
15\begin{adjustwidth}{5em}{5em}
16The JVM primitive value for boolean false.
17\end{adjustwidth}
18
19\paragraph{}
20\label{JAVA:+NULL+}
21\index{+NULL+}
22--- Variable: \textbf{+null+} [\textbf{java}] \textit{}
23
24\begin{adjustwidth}{5em}{5em}
25The JVM null object reference.
26\end{adjustwidth}
27
28\paragraph{}
29\label{JAVA:+TRUE+}
30\index{+TRUE+}
31--- Variable: \textbf{+true+} [\textbf{java}] \textit{}
32
33\begin{adjustwidth}{5em}{5em}
34The JVM primitive value for boolean true.
35\end{adjustwidth}
36
37\paragraph{}
38\label{JAVA:ADD-TO-CLASSPATH}
39\index{ADD-TO-CLASSPATH}
40--- Generic Function: \textbf{add-to-classpath} [\textbf{java}] \textit{}
41
42\begin{adjustwidth}{5em}{5em}
43Add JAR-OR-JARS to the JVM classpath optionally specifying the CLASSLOADER to add.
44
45JAR-OR-JARS is either a pathname designating a jar archive or the root
46directory to search for classes or a list of such values.
47\end{adjustwidth}
48
49\paragraph{}
50\label{JAVA:CHAIN}
51\index{CHAIN}
52--- Macro: \textbf{chain} [\textbf{java}] \textit{}
53
54\begin{adjustwidth}{5em}{5em}
55Performs chained method invocations.
56
57TARGET is either the receiver object when the first call is a virtual method
58call or a list in the form (:static <jclass>) when the first method
59call is a static method call.
60
61OP and each of the OPS are either method designators or lists in the
62form (<method designator> \&rest args), where a method designator is
63either a string naming a method, or a jmethod object. CHAIN will
64perform the method call specified by OP on TARGET; then, for each
65of the OPS, CHAIN will perform the specified method call using the
66object returned by the previous method call as the receiver, and will
67ultimately return the result of the last method call.  For example,
68the form:
69
70  (chain (:static "java.lang.Runtime") "getRuntime" ("exec" "ls"))
71
72is equivalent to the following Java code:
73
74  java.lang.Runtime.getRuntime().exec("ls");
75\end{adjustwidth}
76
77\paragraph{}
78\label{JAVA:DEFINE-JAVA-CLASS}
79\index{DEFINE-JAVA-CLASS}
80--- Macro: \textbf{define-java-class} [\textbf{java}] \textit{}
81
82\begin{adjustwidth}{5em}{5em}
83not-documented
84\end{adjustwidth}
85
86\paragraph{}
87\label{JAVA:DESCRIBE-JAVA-OBJECT}
88\index{DESCRIBE-JAVA-OBJECT}
89--- Function: \textbf{describe-java-object} [\textbf{java}] \textit{object stream}
90
91\begin{adjustwidth}{5em}{5em}
92Print a human friendly description of Java OBJECT to STREAM.
93\end{adjustwidth}
94
95\paragraph{}
96\label{JAVA:DUMP-CLASSPATH}
97\index{DUMP-CLASSPATH}
98--- Function: \textbf{dump-classpath} [\textbf{java}] \textit{\&optional classloader}
99
100\begin{adjustwidth}{5em}{5em}
101not-documented
102\end{adjustwidth}
103
104\paragraph{}
105\label{JAVA:ENSURE-JAVA-CLASS}
106\index{ENSURE-JAVA-CLASS}
107--- Function: \textbf{ensure-java-class} [\textbf{java}] \textit{jclass}
108
109\begin{adjustwidth}{5em}{5em}
110Attempt to ensure that the Java class referenced by JCLASS exists in the current process of the implementation.
111\end{adjustwidth}
112
113\paragraph{}
114\label{JAVA:ENSURE-JAVA-OBJECT}
115\index{ENSURE-JAVA-OBJECT}
116--- Function: \textbf{ensure-java-object} [\textbf{java}] \textit{obj}
117
118\begin{adjustwidth}{5em}{5em}
119Ensures OBJ is wrapped in a JAVA-OBJECT, wrapping it if necessary.
120\end{adjustwidth}
121
122\paragraph{}
123\label{JAVA:GET-CURRENT-CLASSLOADER}
124\index{GET-CURRENT-CLASSLOADER}
125--- Function: \textbf{get-current-classloader} [\textbf{java}] \textit{}
126
127\begin{adjustwidth}{5em}{5em}
128not-documented
129\end{adjustwidth}
130
131\paragraph{}
132\label{JAVA:GET-DEFAULT-CLASSLOADER}
133\index{GET-DEFAULT-CLASSLOADER}
134--- Function: \textbf{get-default-classloader} [\textbf{java}] \textit{}
135
136\begin{adjustwidth}{5em}{5em}
137not-documented
138\end{adjustwidth}
139
140\paragraph{}
141\label{JAVA:JARRAY-COMPONENT-TYPE}
142\index{JARRAY-COMPONENT-TYPE}
143--- Function: \textbf{jarray-component-type} [\textbf{java}] \textit{atype}
144
145\begin{adjustwidth}{5em}{5em}
146Returns the component type of the array type ATYPE
147\end{adjustwidth}
148
149\paragraph{}
150\label{JAVA:JARRAY-FROM-LIST}
151\index{JARRAY-FROM-LIST}
152--- Function: \textbf{jarray-from-list} [\textbf{java}] \textit{list}
153
154\begin{adjustwidth}{5em}{5em}
155Return a Java array from LIST whose type is inferred from the first element.
156
157For more control over the type of the array, use JNEW-ARRAY-FROM-LIST.
158\end{adjustwidth}
159
160\paragraph{}
161\label{JAVA:JARRAY-LENGTH}
162\index{JARRAY-LENGTH}
163--- Function: \textbf{jarray-length} [\textbf{java}] \textit{java-array}
164
165\begin{adjustwidth}{5em}{5em}
166Returns the length of a Java primitive array.
167\end{adjustwidth}
168
169\paragraph{}
170\label{JAVA:JARRAY-REF}
171\index{JARRAY-REF}
172--- Function: \textbf{jarray-ref} [\textbf{java}] \textit{java-array \&rest indices}
173
174\begin{adjustwidth}{5em}{5em}
175Dereferences the Java array JAVA-ARRAY using the given INDICIES, coercing the result into a Lisp object, if possible.
176\end{adjustwidth}
177
178\paragraph{}
179\label{JAVA:JARRAY-REF-RAW}
180\index{JARRAY-REF-RAW}
181--- Function: \textbf{jarray-ref-raw} [\textbf{java}] \textit{java-array \&rest indices}
182
183\begin{adjustwidth}{5em}{5em}
184Dereference the Java array JAVA-ARRAY using the given INDICIES. Does not attempt to coerce the result into a Lisp object.
185\end{adjustwidth}
186
187\paragraph{}
188\label{JAVA:JARRAY-SET}
189\index{JARRAY-SET}
190--- Function: \textbf{jarray-set} [\textbf{java}] \textit{java-array new-value \&rest indices}
191
192\begin{adjustwidth}{5em}{5em}
193Stores NEW-VALUE at the given index in JAVA-ARRAY.
194\end{adjustwidth}
195
196\paragraph{}
197\label{JAVA:JAVA-CLASS}
198\index{JAVA-CLASS}
199--- Class: \textbf{java-class} [\textbf{java}] \textit{}
200
201\begin{adjustwidth}{5em}{5em}
202not-documented
203\end{adjustwidth}
204
205\paragraph{}
206\label{JAVA:JAVA-EXCEPTION}
207\index{JAVA-EXCEPTION}
208--- Class: \textbf{java-exception} [\textbf{java}] \textit{}
209
210\begin{adjustwidth}{5em}{5em}
211not-documented
212\end{adjustwidth}
213
214\paragraph{}
215\label{JAVA:JAVA-EXCEPTION-CAUSE}
216\index{JAVA-EXCEPTION-CAUSE}
217--- Function: \textbf{java-exception-cause} [\textbf{java}] \textit{java-exception}
218
219\begin{adjustwidth}{5em}{5em}
220Returns the cause of JAVA-EXCEPTION. (The cause is the Java Throwable
221  object that caused JAVA-EXCEPTION to be signalled.)
222\end{adjustwidth}
223
224\paragraph{}
225\label{JAVA:JAVA-OBJECT}
226\index{JAVA-OBJECT}
227--- Class: \textbf{java-object} [\textbf{java}] \textit{}
228
229\begin{adjustwidth}{5em}{5em}
230not-documented
231\end{adjustwidth}
232
233\paragraph{}
234\label{JAVA:JAVA-OBJECT-P}
235\index{JAVA-OBJECT-P}
236--- Function: \textbf{java-object-p} [\textbf{java}] \textit{object}
237
238\begin{adjustwidth}{5em}{5em}
239Returns T if OBJECT is a JAVA-OBJECT.
240\end{adjustwidth}
241
242\paragraph{}
243\label{JAVA:JCALL}
244\index{JCALL}
245--- Function: \textbf{jcall} [\textbf{java}] \textit{method-ref instance \&rest args}
246
247\begin{adjustwidth}{5em}{5em}
248Invokes the Java method METHOD-REF on INSTANCE with arguments ARGS, coercing the result into a Lisp object, if possible.
249\end{adjustwidth}
250
251\paragraph{}
252\label{JAVA:JCALL-RAW}
253\index{JCALL-RAW}
254--- Function: \textbf{jcall-raw} [\textbf{java}] \textit{method-ref instance \&rest args}
255
256\begin{adjustwidth}{5em}{5em}
257Invokes the Java method METHOD-REF on INSTANCE with arguments ARGS. Does not attempt to coerce the result into a Lisp object.
258\end{adjustwidth}
259
260\paragraph{}
261\label{JAVA:JCLASS}
262\index{JCLASS}
263--- Function: \textbf{jclass} [\textbf{java}] \textit{name-or-class-ref \&optional class-loader}
264
265\begin{adjustwidth}{5em}{5em}
266Returns a reference to the Java class designated by NAME-OR-CLASS-REF. If the CLASS-LOADER parameter is passed, the class is resolved with respect to the given ClassLoader.
267\end{adjustwidth}
268
269\paragraph{}
270\label{JAVA:JCLASS-ARRAY-P}
271\index{JCLASS-ARRAY-P}
272--- Function: \textbf{jclass-array-p} [\textbf{java}] \textit{class}
273
274\begin{adjustwidth}{5em}{5em}
275Returns T if CLASS is an array class
276\end{adjustwidth}
277
278\paragraph{}
279\label{JAVA:JCLASS-CONSTRUCTORS}
280\index{JCLASS-CONSTRUCTORS}
281--- Function: \textbf{jclass-constructors} [\textbf{java}] \textit{class}
282
283\begin{adjustwidth}{5em}{5em}
284Returns a vector of constructors for CLASS
285\end{adjustwidth}
286
287\paragraph{}
288\label{JAVA:JCLASS-FIELD}
289\index{JCLASS-FIELD}
290--- Function: \textbf{jclass-field} [\textbf{java}] \textit{class field-name}
291
292\begin{adjustwidth}{5em}{5em}
293Returns the field named FIELD-NAME of CLASS
294\end{adjustwidth}
295
296\paragraph{}
297\label{JAVA:JCLASS-FIELDS}
298\index{JCLASS-FIELDS}
299--- Function: \textbf{jclass-fields} [\textbf{java}] \textit{class \&key declared public}
300
301\begin{adjustwidth}{5em}{5em}
302Returns a vector of all (or just the declared/public, if DECLARED/PUBLIC is true) fields of CLASS
303\end{adjustwidth}
304
305\paragraph{}
306\label{JAVA:JCLASS-INTERFACE-P}
307\index{JCLASS-INTERFACE-P}
308--- Function: \textbf{jclass-interface-p} [\textbf{java}] \textit{class}
309
310\begin{adjustwidth}{5em}{5em}
311Returns T if CLASS is an interface
312\end{adjustwidth}
313
314\paragraph{}
315\label{JAVA:JCLASS-INTERFACES}
316\index{JCLASS-INTERFACES}
317--- Function: \textbf{jclass-interfaces} [\textbf{java}] \textit{class}
318
319\begin{adjustwidth}{5em}{5em}
320Returns the vector of interfaces of CLASS
321\end{adjustwidth}
322
323\paragraph{}
324\label{JAVA:JCLASS-METHODS}
325\index{JCLASS-METHODS}
326--- Function: \textbf{jclass-methods} [\textbf{java}] \textit{class \&key declared public}
327
328\begin{adjustwidth}{5em}{5em}
329Return a vector of all (or just the declared/public, if DECLARED/PUBLIC is true) methods of CLASS
330\end{adjustwidth}
331
332\paragraph{}
333\label{JAVA:JCLASS-NAME}
334\index{JCLASS-NAME}
335--- Function: \textbf{jclass-name} [\textbf{java}] \textit{class-ref \&optional name}
336
337\begin{adjustwidth}{5em}{5em}
338When called with one argument, returns the name of the Java class
339  designated by CLASS-REF. When called with two arguments, tests
340  whether CLASS-REF matches NAME.
341\end{adjustwidth}
342
343\paragraph{}
344\label{JAVA:JCLASS-OF}
345\index{JCLASS-OF}
346--- Function: \textbf{jclass-of} [\textbf{java}] \textit{object \&optional name}
347
348\begin{adjustwidth}{5em}{5em}
349Returns the name of the Java class of OBJECT. If the NAME argument is
350  supplied, verifies that OBJECT is an instance of the named class. The name
351  of the class or nil is always returned as a second value.
352\end{adjustwidth}
353
354\paragraph{}
355\label{JAVA:JCLASS-SUPERCLASS}
356\index{JCLASS-SUPERCLASS}
357--- Function: \textbf{jclass-superclass} [\textbf{java}] \textit{class}
358
359\begin{adjustwidth}{5em}{5em}
360Returns the superclass of CLASS, or NIL if it hasn't got one
361\end{adjustwidth}
362
363\paragraph{}
364\label{JAVA:JCLASS-SUPERCLASS-P}
365\index{JCLASS-SUPERCLASS-P}
366--- Function: \textbf{jclass-superclass-p} [\textbf{java}] \textit{class-1 class-2}
367
368\begin{adjustwidth}{5em}{5em}
369Returns T if CLASS-1 is a superclass or interface of CLASS-2
370\end{adjustwidth}
371
372\paragraph{}
373\label{JAVA:JCOERCE}
374\index{JCOERCE}
375--- Function: \textbf{jcoerce} [\textbf{java}] \textit{object intended-class}
376
377\begin{adjustwidth}{5em}{5em}
378Attempts to coerce OBJECT into a JavaObject of class INTENDED-CLASS.  Raises a TYPE-ERROR if no conversion is possible.
379\end{adjustwidth}
380
381\paragraph{}
382\label{JAVA:JCONSTRUCTOR}
383\index{JCONSTRUCTOR}
384--- Function: \textbf{jconstructor} [\textbf{java}] \textit{class-ref \&rest parameter-class-refs}
385
386\begin{adjustwidth}{5em}{5em}
387Returns a reference to the Java constructor of CLASS-REF with the given PARAMETER-CLASS-REFS.
388\end{adjustwidth}
389
390\paragraph{}
391\label{JAVA:JCONSTRUCTOR-PARAMS}
392\index{JCONSTRUCTOR-PARAMS}
393--- Function: \textbf{jconstructor-params} [\textbf{java}] \textit{constructor}
394
395\begin{adjustwidth}{5em}{5em}
396Returns a vector of parameter types (Java classes) for CONSTRUCTOR
397\end{adjustwidth}
398
399\paragraph{}
400\label{JAVA:JEQUAL}
401\index{JEQUAL}
402--- Function: \textbf{jequal} [\textbf{java}] \textit{obj1 obj2}
403
404\begin{adjustwidth}{5em}{5em}
405Compares obj1 with obj2 using java.lang.Object.equals()
406\end{adjustwidth}
407
408\paragraph{}
409\label{JAVA:JFIELD}
410\index{JFIELD}
411--- Function: \textbf{jfield} [\textbf{java}] \textit{class-ref-or-field field-or-instance \&optional instance value}
412
413\begin{adjustwidth}{5em}{5em}
414Retrieves or modifies a field in a Java class or instance.
415
416Supported argument patterns:
417
418   Case 1: class-ref  field-name:
419      Retrieves the value of a static field.
420
421   Case 2: class-ref  field-name  instance-ref:
422      Retrieves the value of a class field of the instance.
423
424   Case 3: class-ref  field-name  primitive-value:
425      Stores a primitive-value in a static field.
426
427   Case 4: class-ref  field-name  instance-ref  value:
428      Stores value in a class field of the instance.
429
430   Case 5: class-ref  field-name  nil  value:
431      Stores value in a static field (when value may be
432      confused with an instance-ref).
433
434   Case 6: field-name  instance:
435      Retrieves the value of a field of the instance. The
436      class is derived from the instance.
437
438   Case 7: field-name  instance  value:
439      Stores value in a field of the instance. The class is
440      derived from the instance.
441
442
443\end{adjustwidth}
444
445\paragraph{}
446\label{JAVA:JFIELD-NAME}
447\index{JFIELD-NAME}
448--- Function: \textbf{jfield-name} [\textbf{java}] \textit{field}
449
450\begin{adjustwidth}{5em}{5em}
451Returns the name of FIELD as a Lisp string
452\end{adjustwidth}
453
454\paragraph{}
455\label{JAVA:JFIELD-RAW}
456\index{JFIELD-RAW}
457--- Function: \textbf{jfield-raw} [\textbf{java}] \textit{class-ref-or-field field-or-instance \&optional instance value}
458
459\begin{adjustwidth}{5em}{5em}
460Retrieves or modifies a field in a Java class or instance. Does not
461attempt to coerce its value or the result into a Lisp object.
462
463Supported argument patterns:
464
465   Case 1: class-ref  field-name:
466      Retrieves the value of a static field.
467
468   Case 2: class-ref  field-name  instance-ref:
469      Retrieves the value of a class field of the instance.
470
471   Case 3: class-ref  field-name  primitive-value:
472      Stores a primitive-value in a static field.
473
474   Case 4: class-ref  field-name  instance-ref  value:
475      Stores value in a class field of the instance.
476
477   Case 5: class-ref  field-name  nil  value:
478      Stores value in a static field (when value may be
479      confused with an instance-ref).
480
481   Case 6: field-name  instance:
482      Retrieves the value of a field of the instance. The
483      class is derived from the instance.
484
485   Case 7: field-name  instance  value:
486      Stores value in a field of the instance. The class is
487      derived from the instance.
488
489
490\end{adjustwidth}
491
492\paragraph{}
493\label{JAVA:JFIELD-TYPE}
494\index{JFIELD-TYPE}
495--- Function: \textbf{jfield-type} [\textbf{java}] \textit{field}
496
497\begin{adjustwidth}{5em}{5em}
498Returns the type (Java class) of FIELD
499\end{adjustwidth}
500
501\paragraph{}
502\label{JAVA:JINPUT-STREAM}
503\index{JINPUT-STREAM}
504--- Function: \textbf{jinput-stream} [\textbf{java}] \textit{pathname}
505
506\begin{adjustwidth}{5em}{5em}
507Returns a java.io.InputStream for resource denoted by PATHNAME.
508\end{adjustwidth}
509
510\paragraph{}
511\label{JAVA:JINSTANCE-OF-P}
512\index{JINSTANCE-OF-P}
513--- Function: \textbf{jinstance-of-p} [\textbf{java}] \textit{obj class}
514
515\begin{adjustwidth}{5em}{5em}
516OBJ is an instance of CLASS (or one of its subclasses)
517\end{adjustwidth}
518
519\paragraph{}
520\label{JAVA:JINTERFACE-IMPLEMENTATION}
521\index{JINTERFACE-IMPLEMENTATION}
522--- Function: \textbf{jinterface-implementation} [\textbf{java}] \textit{interface \&rest method-names-and-defs}
523
524\begin{adjustwidth}{5em}{5em}
525Creates and returns an implementation of a Java interface with
526   methods calling Lisp closures as given in METHOD-NAMES-AND-DEFS.
527
528   INTERFACE is either a Java interface or a string naming one.
529
530   METHOD-NAMES-AND-DEFS is an alternating list of method names
531   (strings) and method definitions (closures).
532
533   For missing methods, a dummy implementation is provided that
534   returns nothing or null depending on whether the return type is
535   void or not. This is for convenience only, and a warning is issued
536   for each undefined method.
537\end{adjustwidth}
538
539\paragraph{}
540\label{JAVA:JMAKE-INVOCATION-HANDLER}
541\index{JMAKE-INVOCATION-HANDLER}
542--- Function: \textbf{jmake-invocation-handler} [\textbf{java}] \textit{function}
543
544\begin{adjustwidth}{5em}{5em}
545not-documented
546\end{adjustwidth}
547
548\paragraph{}
549\label{JAVA:JMAKE-PROXY}
550\index{JMAKE-PROXY}
551--- Generic Function: \textbf{jmake-proxy} [\textbf{java}] \textit{}
552
553\begin{adjustwidth}{5em}{5em}
554Returns a proxy Java object implementing the provided interface(s) using methods implemented in Lisp - typically closures, but implementations are free to provide other mechanisms. You can pass an optional 'lisp-this' object that will be passed to the implementing methods as their first argument. If you don't provide this object, NIL will be used. The second argument of the Lisp methods is the name of the Java method being implemented. This has the implication that overloaded methods are merged, so you have to manually discriminate them if you want to. The remaining arguments are java-objects wrapping the method's parameters.
555\end{adjustwidth}
556
557\paragraph{}
558\label{JAVA:JMEMBER-PROTECTED-P}
559\index{JMEMBER-PROTECTED-P}
560--- Function: \textbf{jmember-protected-p} [\textbf{java}] \textit{member}
561
562\begin{adjustwidth}{5em}{5em}
563MEMBER is a protected member of its declaring class
564\end{adjustwidth}
565
566\paragraph{}
567\label{JAVA:JMEMBER-PUBLIC-P}
568\index{JMEMBER-PUBLIC-P}
569--- Function: \textbf{jmember-public-p} [\textbf{java}] \textit{member}
570
571\begin{adjustwidth}{5em}{5em}
572MEMBER is a public member of its declaring class
573\end{adjustwidth}
574
575\paragraph{}
576\label{JAVA:JMEMBER-STATIC-P}
577\index{JMEMBER-STATIC-P}
578--- Function: \textbf{jmember-static-p} [\textbf{java}] \textit{member}
579
580\begin{adjustwidth}{5em}{5em}
581MEMBER is a static member of its declaring class
582\end{adjustwidth}
583
584\paragraph{}
585\label{JAVA:JMETHOD}
586\index{JMETHOD}
587--- Function: \textbf{jmethod} [\textbf{java}] \textit{class-ref method-name \&rest parameter-class-refs}
588
589\begin{adjustwidth}{5em}{5em}
590Returns a reference to the Java method METHOD-NAME of CLASS-REF with the given PARAMETER-CLASS-REFS.
591\end{adjustwidth}
592
593\paragraph{}
594\label{JAVA:JMETHOD-LET}
595\index{JMETHOD-LET}
596--- Macro: \textbf{jmethod-let} [\textbf{java}] \textit{}
597
598\begin{adjustwidth}{5em}{5em}
599not-documented
600\end{adjustwidth}
601
602\paragraph{}
603\label{JAVA:JMETHOD-NAME}
604\index{JMETHOD-NAME}
605--- Function: \textbf{jmethod-name} [\textbf{java}] \textit{method}
606
607\begin{adjustwidth}{5em}{5em}
608Returns the name of METHOD as a Lisp string
609\end{adjustwidth}
610
611\paragraph{}
612\label{JAVA:JMETHOD-PARAMS}
613\index{JMETHOD-PARAMS}
614--- Function: \textbf{jmethod-params} [\textbf{java}] \textit{method}
615
616\begin{adjustwidth}{5em}{5em}
617Returns a vector of parameter types (Java classes) for METHOD
618\end{adjustwidth}
619
620\paragraph{}
621\label{JAVA:JMETHOD-RETURN-TYPE}
622\index{JMETHOD-RETURN-TYPE}
623--- Function: \textbf{jmethod-return-type} [\textbf{java}] \textit{method}
624
625\begin{adjustwidth}{5em}{5em}
626Returns the result type (Java class) of the METHOD
627\end{adjustwidth}
628
629\paragraph{}
630\label{JAVA:JNEW}
631\index{JNEW}
632--- Function: \textbf{jnew} [\textbf{java}] \textit{constructor \&rest args}
633
634\begin{adjustwidth}{5em}{5em}
635Invokes the Java constructor CONSTRUCTOR with the arguments ARGS.
636\end{adjustwidth}
637
638\paragraph{}
639\label{JAVA:JNEW-ARRAY}
640\index{JNEW-ARRAY}
641--- Function: \textbf{jnew-array} [\textbf{java}] \textit{element-type \&rest dimensions}
642
643\begin{adjustwidth}{5em}{5em}
644Creates a new Java array of type ELEMENT-TYPE, with the given DIMENSIONS.
645\end{adjustwidth}
646
647\paragraph{}
648\label{JAVA:JNEW-ARRAY-FROM-ARRAY}
649\index{JNEW-ARRAY-FROM-ARRAY}
650--- Function: \textbf{jnew-array-from-array} [\textbf{java}] \textit{element-type array}
651
652\begin{adjustwidth}{5em}{5em}
653Returns a new Java array with base type ELEMENT-TYPE (a string or a class-ref)
654   initialized from ARRAY.
655\end{adjustwidth}
656
657\paragraph{}
658\label{JAVA:JNEW-ARRAY-FROM-LIST}
659\index{JNEW-ARRAY-FROM-LIST}
660--- Function: \textbf{jnew-array-from-list} [\textbf{java}] \textit{element-type list}
661
662\begin{adjustwidth}{5em}{5em}
663Returns a new Java array with base type ELEMENT-TYPE (a string or a class-ref)
664   initialized from a Lisp list.
665\end{adjustwidth}
666
667\paragraph{}
668\label{JAVA:JNEW-RUNTIME-CLASS}
669\index{JNEW-RUNTIME-CLASS}
670--- Function: \textbf{jnew-runtime-class} [\textbf{java}] \textit{class-name \&rest args \&key (superclass java.lang.Object) interfaces constructors methods fields (access-flags (quote (public))) annotations (class-loader (make-memory-class-loader))}
671
672\begin{adjustwidth}{5em}{5em}
673Creates and loads a Java class with methods calling Lisp closures
674   as given in METHODS.  CLASS-NAME and SUPER-NAME are strings,
675   INTERFACES is a list of strings, CONSTRUCTORS, METHODS and FIELDS are
676   lists of constructor, method and field definitions.
677
678   Constructor definitions - currently NOT supported - are lists of the form
679   (argument-types function \&optional super-invocation-arguments)
680   where argument-types is a list of strings and function is a lisp function of
681   (1+ (length argument-types)) arguments; the instance (`this') is passed in as
682   the last argument. The optional super-invocation-arguments is a list of numbers
683   between 1 and (length argument-types), where the number k stands for the kth argument
684   to the just defined constructor. If present, the constructor of the superclass
685   will be called with the appropriate arguments. E.g., if the constructor definition is
686   (("java.lang.String" "int") \#'(lambda (string i this) ...) (2 1))
687   then the constructor of the superclass with argument types (int, java.lang.String) will
688   be called with the second and first arguments.
689
690   Method definitions are lists of the form
691
692     (METHOD-NAME RETURN-TYPE ARGUMENT-TYPES FUNCTION \&key MODIFIERS ANNOTATIONS)
693
694   where
695      METHOD-NAME is a string
696      RETURN-TYPE denotes the type of the object returned by the method
697      ARGUMENT-TYPES is a list of parameters to the method
698
699        The types are either strings naming fully qualified java classes or Lisp keywords referring to
700        primitive types (:void, :int, etc.).
701
702     FUNCTION is a Lisp function of minimum arity (1+ (length
703     argument-types)). The instance (`this') is passed as the first
704     argument.
705
706   Field definitions are lists of the form (field-name type \&key modifiers annotations).
707\end{adjustwidth}
708
709\paragraph{}
710\label{JAVA:JNULL-REF-P}
711\index{JNULL-REF-P}
712--- Function: \textbf{jnull-ref-p} [\textbf{java}] \textit{object}
713
714\begin{adjustwidth}{5em}{5em}
715Returns a non-NIL value when the JAVA-OBJECT `object` is `null`,
716or signals a TYPE-ERROR condition if the object isn't of
717the right type.
718\end{adjustwidth}
719
720\paragraph{}
721\label{JAVA:JOBJECT-CLASS}
722\index{JOBJECT-CLASS}
723--- Function: \textbf{jobject-class} [\textbf{java}] \textit{obj}
724
725\begin{adjustwidth}{5em}{5em}
726Returns the Java class that OBJ belongs to
727\end{adjustwidth}
728
729\paragraph{}
730\label{JAVA:JOBJECT-LISP-VALUE}
731\index{JOBJECT-LISP-VALUE}
732--- Function: \textbf{jobject-lisp-value} [\textbf{java}] \textit{java-object}
733
734\begin{adjustwidth}{5em}{5em}
735Attempts to coerce JAVA-OBJECT into a Lisp object.
736\end{adjustwidth}
737
738\paragraph{}
739\label{JAVA:JPROPERTY-VALUE}
740\index{JPROPERTY-VALUE}
741--- Function: \textbf{jproperty-value} [\textbf{java}] \textit{object property}
742
743\begin{adjustwidth}{5em}{5em}
744setf-able access on the Java Beans notion of property named PROPETRY on OBJECT.
745\end{adjustwidth}
746
747\paragraph{}
748\label{JAVA:JREGISTER-HANDLER}
749\index{JREGISTER-HANDLER}
750--- Function: \textbf{jregister-handler} [\textbf{java}] \textit{object event handler \&key data count}
751
752\begin{adjustwidth}{5em}{5em}
753not-documented
754\end{adjustwidth}
755
756\paragraph{}
757\label{JAVA:JRESOLVE-METHOD}
758\index{JRESOLVE-METHOD}
759--- Function: \textbf{jresolve-method} [\textbf{java}] \textit{method-name instance \&rest args}
760
761\begin{adjustwidth}{5em}{5em}
762Finds the most specific Java method METHOD-NAME on INSTANCE applicable to arguments ARGS. Returns NIL if no suitable method is found. The algorithm used for resolution is the same used by JCALL when it is called with a string as the first parameter (METHOD-REF).
763\end{adjustwidth}
764
765\paragraph{}
766\label{JAVA:JRUN-EXCEPTION-PROTECTED}
767\index{JRUN-EXCEPTION-PROTECTED}
768--- Function: \textbf{jrun-exception-protected} [\textbf{java}] \textit{closure}
769
770\begin{adjustwidth}{5em}{5em}
771Invokes the function CLOSURE and returns the result.  Signals an error if stack or heap exhaustion occurs.
772\end{adjustwidth}
773
774\paragraph{}
775\label{JAVA:JSTATIC}
776\index{JSTATIC}
777--- Function: \textbf{jstatic} [\textbf{java}] \textit{method class \&rest args}
778
779\begin{adjustwidth}{5em}{5em}
780Invokes the static method METHOD on class CLASS with ARGS.
781\end{adjustwidth}
782
783\paragraph{}
784\label{JAVA:JSTATIC-RAW}
785\index{JSTATIC-RAW}
786--- Function: \textbf{jstatic-raw} [\textbf{java}] \textit{method class \&rest args}
787
788\begin{adjustwidth}{5em}{5em}
789Invokes the static method METHOD on class CLASS with ARGS. Does not attempt to coerce the arguments or result into a Lisp object.
790\end{adjustwidth}
791
792\paragraph{}
793\label{JAVA:MAKE-CLASSLOADER}
794\index{MAKE-CLASSLOADER}
795--- Function: \textbf{make-classloader} [\textbf{java}] \textit{\&optional parent}
796
797\begin{adjustwidth}{5em}{5em}
798not-documented
799\end{adjustwidth}
800
801\paragraph{}
802\label{JAVA:MAKE-IMMEDIATE-OBJECT}
803\index{MAKE-IMMEDIATE-OBJECT}
804--- Function: \textbf{make-immediate-object} [\textbf{java}] \textit{object \&optional type}
805
806\begin{adjustwidth}{5em}{5em}
807Attempts to coerce a given Lisp object into a java-object of the
808given type.  If type is not provided, works as jobject-lisp-value.
809Currently, type may be :BOOLEAN, treating the object as a truth value,
810or :REF, which returns Java null if NIL is provided.
811
812Deprecated.  Please use JAVA:+NULL+, JAVA:+TRUE+, and JAVA:+FALSE+ for
813constructing wrapped primitive types, JAVA:JOBJECT-LISP-VALUE for converting a
814JAVA:JAVA-OBJECT to a Lisp value, or JAVA:JNULL-REF-P to distinguish a wrapped
815null JAVA-OBJECT from NIL.
816\end{adjustwidth}
817
818\paragraph{}
819\label{JAVA:REGISTER-JAVA-EXCEPTION}
820\index{REGISTER-JAVA-EXCEPTION}
821--- Function: \textbf{register-java-exception} [\textbf{java}] \textit{exception-name condition-symbol}
822
823\begin{adjustwidth}{5em}{5em}
824Registers the Java Throwable named by the symbol EXCEPTION-NAME as the condition designated by CONDITION-SYMBOL.  Returns T if successful, NIL if not.
825\end{adjustwidth}
826
827\paragraph{}
828\label{JAVA:UNREGISTER-JAVA-EXCEPTION}
829\index{UNREGISTER-JAVA-EXCEPTION}
830--- Function: \textbf{unregister-java-exception} [\textbf{java}] \textit{exception-name}
831
832\begin{adjustwidth}{5em}{5em}
833Unregisters the Java Throwable EXCEPTION-NAME previously registered by REGISTER-JAVA-EXCEPTION.
834\end{adjustwidth}
835
Note: See TracBrowser for help on using the repository browser.