Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] How do you update "reception" calls?

Preamble:

Looking at the ECOOP 2001 paper
(http://aspectj.org/documentation/papersAndSlides/ECOOP2001-Overview.pdf
), there is a lot of use of the "receptions" primitive pointcut
designator.  These examples are updated to use "calls" in corresponding
presentation (see
http://aspectj.org/documentation/papersAndSlides/ECOOP2001.pdf).
However, the "Recent Changes" section that corresponds to the
deprecation of "receptions" says that the target type should be
specified using the 'Target' primitive pointcut (see
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc
/changes.html#1.0alpha1).

Question:

The paper presents three classes, FigureElement and its descendents
Point and Line.  It also presents this troublesome pointcut:

	receptions(void FigureElement.incrXY(int, int));

Which "intuitively refers to every time any kind of figure element (i.e.
an instance of Point or Line) receives a call"

Since "receptions" is deprecated, the FAQ says to use :

	target(FigureElement)&& call(void incrXY(int,int))

But the ECOOP presentation uses

	calls(void FigureElement.incrXY());

1.  Are these three pointcuts equivalent?  I.e.
1.1.  How does "target(FigureElement)" work that it is able to select
instances of Line, Point and FigureElement?  Shouldn't it only select
instnaces of FigureElement? 
1.2.  Shouldn't "calls(void FigureElement.incrXY())" only select objects
referenced by a referenced by variable of type FigureElement?


DL


________________________________________________________
Donal Lafferty, P.Eng., BSc. Computer Engineering 
<http://www.dsg.cs.tcd.ie/~laffertd/>



Back to the top