您的位置:首页 > 编程语言 > ASP

Aop/AspectJ

2015-12-11 13:14 549 查看

捕获构造函数连接点

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: