[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Problem in specifying "target"

> But my problem is that if I change my input java program ,I have to manually
> change the class names in target() in the aspect
> Is there a way to do this automatically in AspectJ?

You could annotate the types you are interested in and use that
annotation to drive the aspect

call(* *(..)) && @target(Marker)

then as long as your use types indicate they'd like to be 'traced' by
having @Marker then the aspect will pick them up.

Andy

On 15 January 2012 01:37, pss <sankpiusham@xxxxxxxxx> wrote:
>
> I have an AspectJ program which derives the trace/ call graph of a given
> Java program.
> To capture the joinpoint I have used :
>
> pointcut p(): call(* *(..))  &&( (target(Code)));  // Code is the lone class
> in the input program
>
> In my call graph I want the functions which are user defined only . Call to
> inbuilt functions should not be captured.
> But my problem is that if I change my input java program ,I have to manually
> change the class names in target() in the aspect
> Is there a way to do this automatically in AspectJ?
>
> Thank You
> Preeti
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>