[armedbear-devel] How to access Java fields?

Blake McBride blake at mcbride.name
Wed Feb 10 11:22:11 UTC 2010


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 at users.sourceforge.net <
logicmoo at 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.htm<http://www.franz.com/support/documentation/current/doc/jlinker.htm>for more information.
> .
>
>
>
> On Tue, Feb 9, 2010 at 7:15 PM, Blake McBride <blake at mcbride.name> wrote:
>
>> 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 at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20100210/7925eaad/attachment.html>


More information about the armedbear-devel mailing list