Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How can you access an aspect from a normal java class

> Class G{
>
>        public void setAspectField(){
>                TestAspect.aspectOf().x = 0;
>        }
>
> }
Try openning your Java file in an aspectj editor.

> Also is there some way to define a pointcut in an normal class and then pass
> it to an aspect to use for some predefined advice.

You can't do this exactly.  The closest you can get is to use an
abstract aspect and abstract pointcuts.

>
> Thank you for your help
>
> Piers
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top