Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] PointcutDesignator AST Support

Hi there,

I need to compare two pointcuts or two advices. I'm using the AST for
this, so it boils down to comparing two PointcutDesignators. I just
had a look at the way the matching is done and came to the result that
the recursive matching ends at DefaultTypePattern, or
SignaturePattern, or DefaultPointcut. At that point, the
AjASTMatcher.match(...) simply checks whether the two objects are of
the same type. That doesn't really check, wether the two pointcuts
are actually the same, right? Please tell me if I missed something.

I figure, I could do the matching using something like the String
representation built by the AjNaiveASTFlattener. Not too
sophisticated, though. The problem is that I'm a bit short on time.
Does anyone have a good idea on how to compare two
PointcutDesignators? What do DefaultTypePattern, DefaultPointcut, and
SignaturePattern consist of which could be compared? If not too
complex, I can provide an implementation for the matching. Is there an
open bug for this? At least I didn't find one so I guess I'll open
one.

Thanks for any helpful thoughts.

Cheers
Martin

Just out of curiosity: How would you call that design pattern the
matcher uses? Looks like one twisted sort of a recursive visitor.



Back to the top