Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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


Back to the top