<h2 id="2">#'jfield</h2>
<p id="3"><b>Arguments: </b><i>class-ref-or-field field-or-instance </i>&optional <i>instance value</i></p>
<p id="4">This function retrieves or modifies a field in a Java class or instance. </p>
<p id="5">The valid argument patterns for this operation are: </p>
<ul>
<li id="6"><b><i>class-ref</i> <i>field-name</i></b>: to retrieve the value of a static field.
<li id="7"><b><i>class-ref</i> <i>field-name</i> <i>instance-ref</i></b>: to retrieve the value of a class field of the instance.
<li id="8"><b><i>class-ref</i> <i>field-name</i> <i>primitive-value</i></b>: to store primitive-value in a static field.
<li id="9"><b><i>class-ref</i> <i>field-name</i> <i>instance-ref</i> <i>value</i></b>: to store value in a class field of the instance.
<li id="10"><b><i>class-ref</i> <i>field-name</i> <code>nil</code> <i>value</i></b>: to store value in a static field (when <i>value</i> may be confused with an instance-ref).
<li id="11"><b><i>field-name</i> <i>instance</i></b>: to retrieve the value of a field of the instance. The class is derived from the instance.
<li id="12"><b><i>field-name</i> <i>instance</i> <i>value</i></b>: to store value in a field of the instance. The class is derived from the instance. </li></li></li></li></li></li></li></ul>
<div>See <a href="http://www.franz.com/support/documentation/current/doc/jlinker.htm">jlinker.htm</a> for more information.</div>
<div>. </div>
<div> </div>
<div><br> </div>
<div class="gmail_quote">On Tue, Feb 9, 2010 at 7:15 PM, Blake McBride <span dir="ltr"><<a href="mailto:blake@mcbride.name">blake@mcbride.name</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Greetings,
<div><br></div>
<div>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.</div>
<div><br></div>
<div>BTW, I've now got a Lisp macro that maps all the methods in a Java class into a corresponding CLOS class.</div>
<div><br></div>
<div>Thanks.</div>
<div><br></div><font color="#888888">
<div>Blake McBride</div>
<div><br></div></font><br>_______________________________________________<br>armedbear-devel mailing list<br><a href="mailto:armedbear-devel@common-lisp.net">armedbear-devel@common-lisp.net</a><br><a href="http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel" target="_blank">http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel</a><br>
<br></blockquote></div><br>