[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-users] pointcuts automatically matching joinpoints in subclasses?
- From: "Eric Bodden" <eric.bodden@xxxxxxxxxxxxxx>
- Date: Mon, 19 Nov 2007 12:49:51 -0500
- Delivered-to: email@example.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=D+4p1/9sd9NlHUjhzURsLBvkRjFffrK3aL/wyG8UBbg=; b=khPN7V8supQQmDfHDqYMpsy5oEDXb2WMDjazYkocY8ihSMKRxEUNW5LFU5KjP9s4VRtOeiEdU1Vrh/qiwjiNVyoxtAtox6IjX7K7smCDpVVJpPTjfydzcSZMOKY+BHh7HGy91TimQUIOg2oQ72M9IyGUnrgBFG9LR/H73g8rTkI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=UHw/w/phtLQVl13nQTStkxYz1Ad1UoY/Juh2p9cEzQdJqTJ34nY+e801kL1HK6bjUt9Cbynn5kJYmn+NG61u/CTL8ehV7relDoCIyuPrITLy3l4cCvEJdvyMzmLh+9fyCfZJgIcVd3AyIdHH3lvvrXHfj6OiW5XLT3D7kgRun1g=
> However, I suspect it will not match other methods named "myMethod", defined
> in super- or subclasses of myClass. Is this correct? If so, what's the
> rationale behind this?
It will match calls in subclasses because any instance of an object of
your subclass is also an instance of the super class. Note that this
is different from execution pointcuts.
> Also, what about a method with more/less specific parameter types?
If I remember correctly, parameter types are matched exact.
> Is all this well-defined? Are there good reasons for choosing exactly the
> current way of behaviour?
I think this behaviour makes sense. AFAIK it was chosen because it
made most sense to most people.
Eric (who was not responsible ;-)
Sable Research Group
McGill University, Montréal, Canada