捕获构造函数连接点
pointcut myClassConstructorPointcut() : call(MyClass.new(int,String));
//构造函数之前
before() : myClassConstructorPointcut()
{
}
//构造函数之后
after() : myClassConstructorPointcut()
{
}
捕获对象属性连接点
public pointcut getNamePointcut() : get(String Hello.name);
//构造函数之前
before() : getNamePointcut()
{
}
//构造函数之后
after() : getNamePointcut()
{
}
访问程序中的常量
public pointcut getConstantPointcunt() : get(public static final String Hello.CONSTANT);