Andy,
Adding to the my previous e-mail,I am sharing other piece of code used in aspects, annotation and aop.xml so that it can also be useful to find if there are any faults I made in these and give more details on the query.
Annotation:
@Target({ ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface loadStudent {
}
Aspect:
@Aspect
public abstract class LoadStudentAspect {
@Pointcut
public abstract void readLoadStudent();
@Around("readLoadStudent()")
public Student getStudentInfo() {
return StudentUtil.getStudent();
}
}
aop.xml:
<aspectj>
<aspects>
<concrete-aspect
name="test.LoadStudentAspectImpl"
extends="test.LoadStudentAspect">
<pointcut name="readLoadStudent"
_expression_="get(@test.loadStudent * *)" />
</concrete-aspect>
</aspects>
<weaver options="-verbose -showWeaveInfo">
<include within="test..*"/>
</weaver>
</aspectj>
Thanks.
Sridhar Thiyagarajan
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-dev