Construct a jobject for a CLOS instance.
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 the 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 - 20 Sep 2017