[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| Re: [aspectj-users] Matching based on method parameter value | 
Sorry, I didn't explain my example very well.
Here's my case:
I would like to match
System.out.println("constant string");
But, I do not want to match println from:
public void foo(String runtimeGeneratedString)
{
   System.out.println("fooooo" + runtimeGeneratedString);
}
Unfortunately, 
call(* *..*.*(String)) will match both cases.
From a static perspective (compile-time weaving), this looks like an easy thing to do, but if using load time weaving, I'm not sure how aspectJ would/could do this.
Going off on a tangent...which may help solve my problem in a different way.  To what degree can I limit aspectJ's matching behavior?  I know you can do things like !within() or !withincode(), but those limit you to package, class, or method scope (com.example.*, com.example.Class, com.example.Class.foo()). Is it at all possible to match the 3rd method call of bar() within foo() or even only instrument the method on line XX of my code (assuming debugging symbols included).
thanks,
ed