You can obtain the value of a final static field if you go down
to the lower-level API of Javassist (I agree that the next
release of Javassist support this function with the regular
API).

You must get a java.bytecode.FieldInfo object from CtField
and then obtain a ConstantAttribute object from that
FieldInfo.  Finally, you must search a constant pool in a
class file to find the field value.

Note that this way works only for some basic types of fields,
for example, int or String.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3865398#3865398

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3865398


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to