ABCL doesn't need to implement all of Allegro's API. For instance the marshalling (*make-dist-object*http://www.franz.com/support/documentation/current/doc/operators/jlinker/make-dist-object.htm :/*discard-in-java*http://www.franz.com/support/documentation/current/doc/operators/jlinker/discard-in-java.htm) and connection maintainence like *jlinker-init*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jlinker-init.htm: from section 2.5
Some macros like *def-java-constructor*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-constructor.htm , *def-java-method*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-method.htm *def-java-class*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-class.htmare not present in ABCL but should not be hard to create.
Here is a quick list off top of head:
*jdesc*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jdesc.htm: *Function* (DESCRIBE-JAVA-OBJECT) *jarrayp*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jarrayp.htm: *Function* (missing trivial) *jarray-ref*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jarray-ref.htm: *Function*: *setf*http://www.franz.com/support/documentation/current/ansicl/dictentr/setfpset.htmcan be used with this function to set values in a Java array. (complete) *jarray-set*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jarray-set.htm: *Function*: use of this function is deprecated. Use *jarray-ref*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jarray-ref.htmand *setf*http://www.franz.com/support/documentation/current/ansicl/dictentr/setfpset.htminstead. (complete) *jcall*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jcall.htm: *Function* (complete) *jclass*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jclass.htm: *Function* (complete) *jclass-name*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jclass-name.htm: *Function* (complete) *jclass-of*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jclass-of.htm: *Function* (complete) *jconstructor*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jconstructor.htm: *Function* (complete) *jfield*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jfield.htm: *Function* (complete) *jlinker-version*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jlinker-version.htm: *Function* (un-needed) *jlinker-buffer-size*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jlinker-buffer-size.htm: *Function* (un-needed) *jlookup*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jlookup.htm: *Generic Function* (missing) *jmethod*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jmethod.htm: *Function* (complete) *jnew*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jnew.htm: *Function* (complete) *jnew-array*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jnew-array.htm: *Function* (complete) *jstatic*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jstatic.htm: *Function* (complete) *kcons*http://www.franz.com/support/documentation/current/doc/operators/jlinker/kcons.htm: *Function* (missing trivial) *kmeth*http://www.franz.com/support/documentation/current/doc/operators/jlinker/kmeth.htm: *Function* (missing trivial) *last-use*http://www.franz.com/support/documentation/current/doc/operators/jlinker/last-use.htm: *Generic Function* (missing) *make-dist-object*http://www.franz.com/support/documentation/current/doc/operators/jlinker/make-dist-object.htm: *Generic Function* (un-needed) *make-immediate-object*http://www.franz.com/support/documentation/current/doc/operators/jlinker/make-immediate-object.htm: *Function* (complete) *jnotify-lisp*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jnotify-lisp.htm(missing) *jregister-handler*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jregister-handler.htm(complete) *jquery-handler*http://www.franz.com/support/documentation/current/doc/operators/jlinker/jquery-handler.htm (missing) *def-java-to-lisp-wrapper*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-to-lisp-wrapper.htm, *gen-output-lang*http://www.franz.com/support/documentation/current/doc/operators/jlinker/gen-output-lang.htm, and *gen-java-stream*http://www.franz.com/support/documentation/current/doc/operators/jlinker/gen-java-stream.htm. (missing)
*def-java-class*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-class.htmcan be used to define a Lisp class which corresponds to a Java class. (missing)
*def-java-constructor*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-constructor.htmallows defining constructor functions to create instances of the classes defined with *def-java-class*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-class.htm. (missing)
The macro *def-java-method*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-method.htmcan be used to define methods.(missing)
*def-java-static*http://www.franz.com/support/documentation/current/doc/operators/jlinker/def-java-static.htmdefines static methods. (missing)
Though also through other parts of ABCL some things are easier to put in than others. And ABCL when used with ASM.JAR can create new java classes which has unlimited possiblities
On Wed, Feb 10, 2010 at 3:22 AM, Blake McBride blake@mcbride.name wrote:
I didn't realize ABCL uses Allegro's Java interface API. Is ABCL's version complete (according to Allegro's docs)?
Thanks.
Blake McBride
On Tue, Feb 9, 2010 at 10:02 PM, dmiles@users.sourceforge.net < logicmoo@gmail.com> wrote:
#'jfield
*Arguments: **class-ref-or-field field-or-instance *&optional *instance value*
This function retrieves or modifies a field in a Java class or instance.
The valid argument patterns for this operation are:
- *class-ref field-name*: to retrieve the value of a static field.
- *class-ref field-name instance-ref*: to retrieve the value of a
class field of the instance.
- *class-ref field-name primitive-value*: to store primitive-value
in a static field.
- *class-ref field-name instance-ref value*: to store value in a
class field of the instance.
- *class-ref field-name nil value*: to store value in a static
field (when *value* may be confused with an instance-ref).
- *field-name instance*: to retrieve the value of a field of the
instance. The class is derived from the instance.
- *field-name instance value*: to store value in a field of the
instance. The class is derived from the instance.
See jlinker.htmhttp://www.franz.com/support/documentation/current/doc/jlinker.htmfor more information. .
On Tue, Feb 9, 2010 at 7:15 PM, Blake McBride blake@mcbride.namewrote:
Greetings,
I know how to gain access to and execute Java methods via jmethod and jcall, however, I don't know how to get and set instance and static fields (or variables) within a Java class. Any help would be greatly appreciated.
BTW, I've now got a Lisp macro that maps all the methods in a Java class into a corresponding CLOS class.
Thanks.
Blake McBride
armedbear-devel mailing list armedbear-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel