我有这个方面:
public privileged aspect Teste {
private ISupermarket supermarket;
@AfterReturning(pointcut = "execution(* ca1.business.SupermarketFactory.createSupermarket(..))", returning = "result")
public void afterCreateSupermarket(JoinPoint joinPoint, Object result) {
supermarket = (ISupermarket) result;
}
}
问题是我想用本机 AspectJ 表示法对其进行编码。
我搜索了,但我得到的最接近的是:
void after() returning(result) : pointcut(* ca1.business.SupermarketFactory.createSupermarket(..)) {
supermarket = (ISupermarket) result;
}
但这给了我一些错误,因为它没有很好地编码。
谁能帮我这个?