Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Capturing data at a pointcut

Hi all,

I am implementing some dynamic programming analysis using AspectJ. For
example, consider the program:

Set<Object> s = new HashSet<Object>();
s.add(o1);
s.remove(o1);

In this program at each add and remove method call, I need the
following information:

1) a string showing the type of s and a fully qualified name of the
field with the name of the field. "java.util.Set com.x.y.z.a.b.c.s".
2) a reference to object o1.
3) a reference to set s.
4) The lineno and the file name at which the call is taking place.

I can get (2), (3) and (4) using the argument, target and
thisJoinPoint.getStaticpart.getLineNo() respectively. How can I get
(1) the name of the field s and it's type from a point cut?

Thanks,
-S-


Back to the top