I just started experimenting with Javassist and I already ran into trouble on the first tutorial page (the method interception one). If I compile and execute the example I get the following output (no files were changed):
--- pojo.noop(); ---
<<< Entering SimpleInterceptor
<<< Entering MethodInterceptor for: public void POJO.noop()
noop()
>>> Leaving MethodInterceptor
>>> Leaving SimpleInterceptor
--- pojo.test1(String param); ---
test1(String param): hello world
--- pojo.test1(int param); ---
<<< Entering MethodInterceptor for: public void POJO.test2(int)
<<< Entering MethodInterceptor for: public void POJO.test2(int)
test2(int param): 55
<<< Entering MethodInterceptor for: public void POJO$Bar.hello()
hello
>>> Leaving MethodInterceptor
>>> Leaving MethodInterceptor
>>> Leaving MethodInterceptor
--- POJO.test2(); ---
static method
Which is not what I expected since the static method test2() should be intercepted by the MethodInterceptor and the noop() method shouldn't be.
I'm not sure if I did anything wrong (I checked all the files and it seems to be ok) or how I can try to fix this problem, but I hope some one can help.
Thanks in advance,
Peter