开发者

Are there any Java runtime exploring tools?

Are there any Java runtime exploring tools? I mean the tools allowing to invoke concrete objects' methods in the running application (to check the correct behavior). It would be nice if I could substitute the object with another object of this type also, may be instantiated from sketch or deserialized from some sour开发者_运维问答ce. As I looked, usual debuggers are limited in this possibilities, but I dont pretend to the fact Ive checked all of them.


I would suggest bytecode manipulation frameworks like ASM or BCEL for this purpose.


I would use basic jUnit and EasyMock for creating different input mock objects to check the behavior of your class in different situations. Then in the end you have a nice set of unit tests to maintain your codebase.


You should be able to achieve this at a higher level than direct bytecode manipulation using AOP tools such as AspectJ. Here are a couple of pointers:

  • http://www.ibm.com/developerworks/java/library/j-aspectj2/
  • http://danielroop.com/blog/2007/10/04/jmock-and-aspectj/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜