Discussion:
[jboss-user] [Javassist] - Javassist dealing across different project packages
Melissa Dale
2013-05-24 19:52:55 UTC
Permalink
Melissa Dale [https://community.jboss.org/people/mdale] created the discussion

"Javassist dealing across different project packages"

To view the discussion, visit: https://community.jboss.org/message/819461#819461

--------------------------------------------------------------
Concept question: Is there a way to write a javassist program in a package other than the src folder that can modifiy other classes (either in the src folder or sub folders of the src folder).  I have messed around with "cp.addPath("/usr/local/javalib");" and I cannot get that to work. I do not know if that is because I am not using it properly, or if that isn't even an appropriate approach to modifying java files in other packages.

Any input would be greatly appreciated. Thanks!
--------------------------------------------------------------

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

Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2062]
Melissa Dale
2013-06-01 04:21:32 UTC
Permalink
Melissa Dale [https://community.jboss.org/people/mdale] created the discussion

"Re: Javassist dealing across different project packages"

To view the discussion, visit: https://community.jboss.org/message/820787#820787

--------------------------------------------------------------
I was making this much more difficult than was needed. Say for example I wanted to modify a "foo.java" class in a "stuff" package. I simply use: pool.get(stuff.foo);
That's it, now I have the foo class in the classpool.
--------------------------------------------------------------

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

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