Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Compilation error in simple aspect

Modify you pointcut to:

pointcut TrackTransition(TransitionTable table, int[] states, 
                         char symbol)
   : call(int[] TransitionTable.getTransitions(int[], char))
     && target(table) && args(states, symbol);

The reason: Only this(), target(), and args() PCDs are allowed
to capture the join point context.

-Ramnivas

PS: Such emails should be sent to aspectj-user mailing list.

--- unmesh joshi <unmesh_joshi@xxxxxxxxx> wrote:
> 
> hi I have following aspect
> 
> public aspect Trace {
>     
>     pointcut TrackTransition(TransitionTable table, int[]states, char
> symbol):call(int[] table.getTransitions(states, symbol));
>     }
> 
> But when i compile using ajc, i get following error
> 
> C:\unmesh\projects\java\automata\src>ajc -d ..\build\classes *.java
> .\Trace.java:4:90: name binding is only allowed in target, this, and
> args PCDs
>     pointcut TrackTransition(TransitionTable table, int[]states, char
> symbol):ca
> ll(int[] table.getTransitions(states, symbol));
> 
>          ^
> .\Trace.java:4:111: name binding is only allowed in target, this, and
> args PCDs
>     pointcut TrackTransition(TransitionTable table, int[]states, char
> symbol):ca
> ll(int[] table.getTransitions(states, symbol));
> 
> 
> I am using aspectj 1.0, can anybody please explain whats going on.?
>  
> Thanks,
> Unmesh
>  aspectj-dev-request@xxxxxxxxxxx wrote:Welcome to the
> aspectj-dev@xxxxxxxxxxx mailing list!
> 
> To post to this list, send your email to:
> 
> aspectj-dev@xxxxxxxxxxx
> 
> General information about the mailing list is at:
> 
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev
> 
> If you ever want to unsubscribe or change your options (eg, switch to
> or from digest mode, change your password, etc.), visit your
> subscription page at:
> 
>
http://dev.eclipse.org/mailman/options/aspectj-dev/unmesh_joshi%40yahoo.com
> 
> 
> You can also make such adjustments via email by sending a message to:
> 
> aspectj-dev-request@xxxxxxxxxxx
> 
> with the word `help' in the subject or body (don't include the
> quotes), and you will get back a message with instructions.
> 
> You must know your password to change your options (including
> changing
> the password, itself) or to unsubscribe. It is:
> 
> swati
> 
> If you forget your password, don't worry, you will receive a monthly
> reminder telling you what all your eclipse.org mailing list passwords
> are, and how to unsubscribe or change your options. There is also a
> button on your options page that will email your current password to
> you.
> 
> You may also have your password mailed to you automatically off of
> the
> Web page noted above.
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


Back to the top