> We want to quantify over all objects o and all fields f. That is, we
> want to find all o and f which match the trace. Tracematches already
> automatically quantify over all objects o, so that's fine. But,
> currently, we don't have any way of quantifying over all fields
> f. Note that we can't just use * for f, because we need it to be
> the same f in weave and unweave.
I think you can do what the nulltracker benchmark does
(cvs repository tmbenches, in tmbenches/nulltracker/Tracematch.java)
It binds the _object_ o, and the _signature_ of f, thereby uniquely
identifying the field without having some kind of field-object.
(subtleties include making sure you intern() the signature of f so
that it can be compared using reference equality)
Julian
Extract from tmbenches/nulltracker/Tracematch.java:
pointcut signature(String s) :
let (s, thisJoinPoint.getSignature().toString().intern());
.
.
..... get(* *) && target(o) && signature(s) ...........
Received on Thu Mar 02 14:44:17 2006
This archive was generated by hypermail 2.1.8 : Tue Mar 06 2007 - 16:13:27 GMT