[armedbear-devel] How to access Java fields?
dmiles@users.sourceforge.net
logicmoo at gmail.com
Wed Feb 10 04:02:02 UTC 2010
#'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/20100209/0cce5845/attachment.html>
More information about the armedbear-devel
mailing list