[armedbear-cvs] r13661 - branches/1.0.x/abcl/doc/manual

mevenson at common-lisp.net mevenson at common-lisp.net
Fri Oct 21 21:37:58 UTC 2011


Author: mevenson
Date: Fri Oct 21 14:37:58 2011
New Revision: 13661

Log:
Backport Erik's contribution to accessing Java fields.

Modified:
   branches/1.0.x/abcl/doc/manual/abcl.tex

Modified: branches/1.0.x/abcl/doc/manual/abcl.tex
==============================================================================
--- branches/1.0.x/abcl/doc/manual/abcl.tex	Fri Oct 21 14:28:49 2011	(r13660)
+++ branches/1.0.x/abcl/doc/manual/abcl.tex	Fri Oct 21 14:37:58 2011	(r13661)
@@ -353,6 +353,27 @@
 The constructor can't be passed to \code{JAVA:JCALL}, but instead should
 be passed as an argument to \code{JAVA:JNEW}.
 
+\subsubsection{Accessing Java object fields}
+
+Fields in Java objects can be accessed using the getter and setter functions
+\code{JAVA:GETFIELD} and \code{JAVA:PUTFIELD}. This applies to values stored in object
+instances. If you want to access static fields: see the next section.
+
+Like \code{JAVA:JCALL} and friends, values returned from these accessors carry
+an intended class around and values which can be converted to Lisp values will
+be converted.
+
+\subsubsection{Accessing Java static fields}
+
+Static fields in Java objects (class fields) can be accessed using the getter
+and setter functions \code{JAVA:GETSTATIC} and \code{JAVA:PUTSTATIC}. Values
+stored in object instance fields can be accessed as described in the previous
+section.
+
+Like \code{JAVA:JCALL} and friends, values returned from these accessors carry
+an intended class around and values which can be converted to Lisp values will
+be converted.
+
 \section{Lisp from Java}
 
 In order to access the Lisp world from Java, one needs to be aware




More information about the armedbear-cvs mailing list