Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Access-modifier pattern for package visibility

Good guess.  Here's a snippet from
  aspectj-1.5\doc\aspectjlib\src\org\aspectj\lib\pointcuts\Pointcuts.java:

    public pointcut anyPackageProtectedMethodExecution() : 
        execution(!private !public !protected * *(..));

You can pretty easily write small test programs to validate your guesses.

btw, I wouldn't use CVS to access the docs.  From

  http://www.eclipse.org/aspectj/docs.php

You'll see the released docs at

  http://www.eclipse.org/aspectj/doc/released/index.html

and the next/upcoming docs at:

 http://www.eclipse.org/aspectj/doc/next/index.html

Wes


> ------------Original Message------------
> From: Aqualoom <aqualoom@xxxxxxxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Thu, Nov-23-2006 11:09 AM
> Subject: [aspectj-users] Access-modifier pattern for package visibility
>
> Hello,
> 
> According to [i] the method modifier pattern has the following syntax:
> 
> MethodModifiersPattern := '!'? MethodModifier MethodModifiersPattern*
> MethodModifier := 'public' | 'private' | 'protected' | 'static' | 
>                                   'synchronized' | 'final' 
> 
> So "public protected" would be perfectly valid. As I understand it, all
> modifiers are anded together, thus "public protected" would lead to an
> empty result set. Right?
> Is there any way to specifiy, that there must be no specifier (i.e. for
> methods with package visibility)? 
> Would this be done by: "!public !private !protected"?
> 
> Thanks Benjamin
> 
> [1]
> http://dev.eclipse.org/viewcvs/indextech.cgi/*checkout*/aspectj-home/doc/ajdk15notebook/printable.html?rev=HEAD&content-type=text/html
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 



Back to the top