AspectJ术语

一、AspectJ是什么
AspectJ(即AOP,面向切面编程)
二、典型应用
安全策略问题


三、AOP术语
pointcut(切点):
通过正则表达式选出一组我们感兴趣的执行点,或者说是程序执行点的集合
joinpoint(连接点):
通过pointcut选取出来的集合中的具体的一个执行点,即程序运行中的某个执行点,比如方法的调用、异常的抛出等。比如方法doSome();
advice(what to do): 通知,定义了由切点选择的连接点的横切动作,即某个连接点所采用的处理逻辑,也就是向连接点注入的代码。例如:输出的日志信息   就是一个Advice,主要包含
1、before advice(前置通知)
2、after advice
a. after finally
b. after returning
c. after throwing
3、around advice(环绕通知)
aspect(抽象概念):
Aspects wrap up pointcuts, advice, and inter-type declarations in a a modular unit of crosscutting implementation. It is defined very much like a class, and can have methods, fields, and initializers in addition to the crosscutting members. Because only aspects may include these crosscutting members, the declaration of these effects is localized.
target:被aspectj横切的对象。我们所说的joinPoint就是Target的某一行,如方法开始执行的地方、方法类调用某个其他方法的代码。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值