target(ves) is failing because the Vessel object does not exist.
Since the pointcut runs *before* the call to new, there is no object
to bind.

However, changing call to execution should work (as long as you are
able to weave into the Vessel class's constructor).

On Fri, Nov 27, 2009 at 9:17 AM, ivlev jenia <[email protected]> wrote:
>      pointcut instanceTracker(Vessel ves) :
> call(Vessel+.new(..))&&target(ves) ;
>      before (Vessel ves) : instanceTracker(ves){//   this is the place
> *************************
>          System.out.println(thisJoinPoint);
>          System.out.println(ves.getClass().getCanonicalName());
>      }
>
> but at "this is the place" the
>  compiler gives me  warning : advice defined in cut has not been applied
> [Xlint:adviceDidNotMatch]
> What is the problem?????
>
> if i do :
>
>
>      pointcut instanceTracker() :
>  call(Vessel+.new(..)) ;
>      before () : instanceTracker(){//   this is the place
> *************************
>          System.out.println(thisJoinPoint);
>  //        System.out.println(ves.getClass().getCanonicalName());
>      }
>
>
> everything works
> anyone knows whats the problem?
>
> ________________________________
> Make your browsing faster, safer, and easier with the new Internet Explorer®
> 8. Optimized for Yahoo! Get it Now for Free!
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to