[jboss-user] [Javassist] - How can get the initial member field value?

xeo show do-not-reply at jboss.com
Sat Jun 5 19:10:56 EDT 2010


xeo show [http://community.jboss.org/people/xeoshow] created the discussion

"How can get the initial member field value?"

To view the discussion, visit: http://community.jboss.org/message/546345#546345

--------------------------------------------------------------
Hello, dear all

I want to get the initial member field value via javassist, can that be achived?

For example, sample class as below. I just want exactly get the 2 for x, 3 for y, and "world" for str, and "hello" for s, and the string "new HashMap()" for hashMap (not the result of  new HashMap(), just the string "new HashMap()"). Can this be done via javassist? Thanks a lot.

---------------------------------
public class Point {
    static int x = 2;
    int y = 3;
    static String str = "world";
    String s = "hello";
    HashMap hashMap = new HashMap();

    void move(int m, int n) {
        x = x + m;
        y += n;
        hashMap.put("name", "hashmap");
    }

}

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/546345#546345]

Start a new discussion in Javassist at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2062]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100605/a4f9be09/attachment-0001.html 


More information about the jboss-user mailing list