lundi 7 juillet 2014

Is there a way to write a pointcut for a getter to an annotated field?


Vote count:

0




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 even feasible?



asked 2 mins ago

Eric B.

3,209





Aucun commentaire:

Enregistrer un commentaire