After playing around with AspectJ, I finally rediscovered the join point I
was looking for:

pointcut embeddedGetter() : get( @MyAnnotation Validity *..* );

Thanks,

Eric



On Mon, Jul 7, 2014 at 9:38 PM, Eric B <[email protected]> wrote:

> I'm trying to write a pointcut which will intercept getters for annotated
> members.
>
> public class MyClass {
>
>     private String volume;
>
>     @MyAttribute
>     private Validity validity;
>
>
>     public void setValidity( Validity obj ){
>         validity = obj;
>     }
>
>     public Validity getValidity(){
>         return validity;
>     }}
>
> Is there a way to write a pointcut that will intercept all calls to
> getValidity() based on validity being annotated with @MyAttribute?
> Written differently, I'm looking to create a pointcut for any getter of a
> member field that is annotated with @MyAttribute.
>
> Is this feasible?
>
> Thanks,
>
> Eric
>
>
>
_______________________________________________
aspectj-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to