Hello Eric,
2008/4/21, Eric Bodden <eric.bodden_at_mail.mcgill.ca>:
> This is why you get the behaviour you are seeing right now. A
>  StmtShadowMatch is a represents a shadow for a *single* statement.
>  Therefore you should not subclass StmtShadowMatch but rather
>  ShadowMatch.
OK, i changed it (and everything which depends on it)
>  > The stmt of my BlockShadowMatch ist the beginning of
>  >  my "source-code"-block. Additional to this stmt my ShadowMatch
>  >  includes a second statement being the end statement of the
>  >  "source-code"-block. When i got it right i have to provide an own
>  >  Weaver and overrride the Weaver.inlineConstructors() method in order
>  >  to instantiate my own ShadowPointsSetter.
>  >
>  >  I copy a lot of code from the original ShadowPointsSetter into my own
>  >  an add a simple routine which handles my BlockShadowMatches.
>
>
> Yes to me this sounds like the correct way to do it.
And it works!
Here is the output of my compiled example:
...
before the block
        before - TESTING - block(ClassNotFoundException aspectjtest.Test.(Test))
1. stmt in block
2. stmt in block
        after - TESTING - block(ClassNotFoundException aspectjtest.Test.(Test))
after the block
...
Now I can go on the the next thing. Perhaps you can give me a hint here, too.
I want to add arguments to the block so that i can capture these
arguments in my joinpoint.
Analogue to call/execution pointcut i want to use the arguments of the
block in the advice.
How can I do this?
I have seen that my ShadowMatch has the method getArgsContextValues().
But different from the MethodCallShadowMatch I have no invoke
statement, where i can get the args from. I have the info about the
args in my frontend and can pass them into the ShadowMatch in a Tag
(similar i do it with the start and end of block) but how do i create
the List of Immediate?
Thanks for your help.
Greetings,
Thomas
Received on Tue Apr 22 2008 - 10:39:42 BST
This archive was generated by hypermail 2.2.0 : Tue Apr 22 2008 - 17:50:10 BST