| Allegro CL version 6.1 Moderately revised | |||||||||
Arguments: x &optional type-modifier (symcase :read) (pkcase symcase)
This function creates a wrapper object that is used to transfer a
(copied) value from Lisp to Java. If the lisp value (which is the
value of x) must be passed as a remote reference,
this function returns nil. The more general
function make-dist-object creates a
wrapped value object or a remote reference.
The possible values of the type-modifier argument
are shown in the tables below. The entry in the table shows the Java
type of the value that is received in the Java application. If the
table entry is ref, then the value must be passed
as a reference and this function returns nil. Numeric values are
silently truncated to the required size in Java.
The third and fourth arguments are used only when the first argument is a symbol. The symbol modifiers are described after the table notes.
Lisp type ------ type-modifier argument: --------
of x :ref :boolean :byte :short :int
bignum ref boolean byte short int
integer int boolean byte short int
real ref boolean double double double
string ref boolean String String String
character char boolean char char char
(array
(signed-byte 32)
(*)) ref boolean byte[] short[] int[]
(array
double-float
(*)) ref boolean double[] double[] double[]
null null boolean byte[] short[] int[]
symbol(2) ref boolean ref ref ref
cons (1) ref boolean byte[] short[] int[]
Lisp type ------- type-modifier argument: ------
of x :long :single :double :string
bignum long int int int
integer long int int int
real double float double double
string String String String String
character char char char char
(array
(signed-byte 32)
(*)) int[] int[] int[] int[]
(array
double-float
(*)) double[] float[] double[] double[]
null null float[] double[] String[]
symbol ref ref ref ref
(see note 2)
cons ref float[] double[] String[]
(see note 1)
Note (1): when a type is specified and the argument x is a cons, we attempt to make a Java array of the specified type. If an unsuitable value is found in the list, an error is signaled. Integer values must be in the Java int range and get truncated to byte or short if appropriate.
Note (2): when the argument x is a symbol, the type argument may be one of the Lisp symbols symbol-value, symbol-function, or class to transmit a remote reference to the corresponding Lisp value.
A reference to a symbol is composed of the symbol name and the name of
the package bound to *package* at the time make-immediate-object is called.
The symcase and pkcase
arguments apply only to symbol references and determine how the symbol
name will be transmitted in the remote reference. This will determine
how the symbol will be resolved when the remote reference returns from
the Java program. The values of those arguments can be:
:intern:
pass the symbol name and/or package name as a
string to be interpreted literally.
:find:
pass the symbol name and/or package name as a string.
A package name is resolved by searching the
list of existing package names and nicknames
matching with equalp.
A symbol name is resolved by searching the visible
symbols in the specified package.
:read:
pass the symbol name and/or package name as a string
created with the ~S format directive.
A package name is resolved by reading the package
name string with *package* bound to the keyword
package.
A symbol name is resolved by reading the symbol name string with *package* bound to the specified package.
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 moderate revisions.
Created 2001.12.15.
| Allegro CL version 6.1 Moderately revised | |||||||||