[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
Re: [aspectj-users] Accessing members in anonymous inner classes
|
- From: Fernando Castor Filho <fernando.castor@xxxxxxxxx>
- Date: Tue, 15 Nov 2005 00:21:37 -0200
- Delivered-to: aspectj-users@eclipse.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MiK7RiY7/Fw6vepKoQldt6DNbkpphAevfmG3FV4LaEEo/j1uILfDoRJCbjyODCVe9w1Ezo+XGYS0+5LaJyxmFD0HXtinDWqR/0O0aZO76YMpSflg4YfdS+HbMnDin2NlnNPafxqpDLvZ4xxs6SJ5tMSdhOgVPpPYbF7O5Gjbp1w=
Matthew,
Assuming that works, it would capture all the visit() methods defined
by implementors of IResourceVisitor. I want to capture one specific
definition of the visit() method defined by a specific class, say, C.
Any ideas?
Thank you!
Cheers,
Fernando
On 11/14/05, Matthew Webster <matthew_webster@xxxxxxxxxx> wrote:
>
> Fernando,
>
> How about "execution(public boolean visit(IResource innerResource)) &&
> this(IResourceVisitor)"?
>
> Matthew Webster
> AOSD Project
> Java Technology Centre, MP146
> IBM Hursley Park, Winchester, SO21 2JN, England
> Telephone: +44 196 2816139 (external) 246139 (internal)
> Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
> http://w3.hursley.ibm.com/~websterm/
>
> Please respond to aspectj-users@xxxxxxxxxxx
>
> Sent by: aspectj-users-bounces@xxxxxxxxxxx
>
> To: aspectj-users@xxxxxxxxxxx
> cc:
> Subject: [aspectj-users] Accessing members in anonymous inner classes
>
>
> Hi everyone,
>
> I am having some trouble trying to select via PCDs methods defined by
> anonymous inner classes. For example, in the snippet below, how do I
> select the visit() method without selecting all the methods named
> visit() ?
>
> try {
> resource.accept(new IResourceVisitor() {
> public boolean visit(IResource
> innerResource) throws CoreException {
> try {
>
> Policy.checkCanceled(monitor);
> if
> (innerResource.getType() != IResource.FILE) {
> ... // does something
> }
> if
> (isOutOfSync(innerResource, monitor)) {
>
> SyncInfo info = getSyncInfo(innerResource);
>
> if (info != null && info.getKind() != 0) {
>
> set.add(info);
>
> }
> }
> } catch (TeamException e)
> {
> .... // handles the exception
> }
> return true;
> }
> }, depth, true /* include phantoms */);
> }
>
> Thanks!
>
> Cheers,
> Fernando
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>
>
>
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>