Construct a jobject for a CLOS instance.
lw-ji
create-instance-jobject-list instance args => jobject
create-instance-jobject instance &rest args
| instance⇩ |
An instance of a subclass of standard-java-object. |
| args⇩ |
A list or t. |
| jobject |
A jobject. |
The functions create-instance-jobject-list and create-instance-jobject construct a jobject for the CLOS instance instance and set its slot to that jobject.
The type of instance (that is, the class name of its class) must have been associated with a Java constructor by passing it as the class-symbol argument to define-java-constructor or setup-java-constructor.
create-instance-jobject just calls create-instance-jobject-list with instance and args.
create-instance-jobject-list constructs the jobject using args. args can be either the list of arguments for the constructor (the list may be nil), or t, in which case create-instance-jobject-list uses default-constructor-arguments to create a list of arguments and uses it instead. The Java constructor is called in the same way that it would be called by the caller that is defined by define-java-constructor. See define-java-constructor for details of calling. The result of the construction is stored in instance and is returned.
create-instance-jobject-list and create-instance-jobject do not actually call it, but share information with it.create-instance-jobject-list and create-instance-jobject ignore the current jobject in instance, if there is one. There is no problem calling create-instance-jobject-list and create-instance-jobject repeatedly on the same instance.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:46