JBoss Developer : Discussion List - Javassist DevelopmentLatest Forum Threads in Javassist Developmenthttps://developer.jboss.org/community/javassist/dev?view=discussionsJive Engage2013-09-04T22:30:02Z2013-09-04T22:30:02ZenRead value of variable with JavassistDiego Adrada/people/diego.adradado-not-reply@jboss.com2013-09-04T22:30:02Z2013-09-04T22:30:02Z<!-- [DocumentBodyStart:eca6c64c-e5fc-485e-9424-7bd947293f33] --><div class="jive-rendered-content"><p>I'm using Javassist to get the Fields on a Class, using the following code:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&nbsp;</p><!--[CodeBlockStart:27ee9666-e53c-4539-a7e2-e896bc5b31d4][excluded]--><pre class="java" name="code">
for (CtField ctf : ctclass.getDeclaredFields()) {
&nbsp;&nbsp; System.out.println(ctf.getName());
}
</pre><!--[CodeBlockEnd:27ee9666-e53c-4539-a7e2-e896bc5b31d4]--><div style="display:none;"></div><p>Thus, all the variables of the class to which I am accessing, are displayed on the screen and this works well.</p><p>What I want to know is it is possible to access the value of any of these variables?</p><p>Thanks for your help!</p></div><!-- [DocumentBodyEnd:eca6c64c-e5fc-485e-9424-7bd947293f33] --><img src='/beacon?t=1425423090481' />2013-09-04T22:30:02Z1 year 6 months ago10