source: branches/streams/abcl/doc/manual/java.tex

Last change on this file was 14766, checked in by Mark Evenson, 10 years ago

Re-grovel docstrings with improved code.

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