source: trunk/abcl/doc/manual/java.tex

Last change on this file was 15674, checked in by Mark Evenson, 14 months ago

Augment JAVA:JNEW-RUNTIME-CLASS docstring

(Uthar)

Via <https://github.com/armedbear/abcl/pull/517#issuecomment-1444516133>.

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