Ignore:
Timestamp:
10/21/11 21:37:58 (12 years ago)
Author:
Mark Evenson
Message:

Backport Erik's contribution to accessing Java fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0.x/abcl/doc/manual/abcl.tex

    r13659 r13661  
    353353The constructor can't be passed to \code{JAVA:JCALL}, but instead should
    354354be passed as an argument to \code{JAVA:JNEW}.
     355
     356\subsubsection{Accessing Java object fields}
     357
     358Fields in Java objects can be accessed using the getter and setter functions
     359\code{JAVA:GETFIELD} and \code{JAVA:PUTFIELD}. This applies to values stored in object
     360instances. If you want to access static fields: see the next section.
     361
     362Like \code{JAVA:JCALL} and friends, values returned from these accessors carry
     363an intended class around and values which can be converted to Lisp values will
     364be converted.
     365
     366\subsubsection{Accessing Java static fields}
     367
     368Static fields in Java objects (class fields) can be accessed using the getter
     369and setter functions \code{JAVA:GETSTATIC} and \code{JAVA:PUTSTATIC}. Values
     370stored in object instance fields can be accessed as described in the previous
     371section.
     372
     373Like \code{JAVA:JCALL} and friends, values returned from these accessors carry
     374an intended class around and values which can be converted to Lisp values will
     375be converted.
    355376
    356377\section{Lisp from Java}
Note: See TracChangeset for help on using the changeset viewer.