Aop的几个术语 (转)

从Spring文档来的,清楚定义了几个aop的术语,因为aop这些术语并不直观,所以专门列出来备查。
• Aspect: A modularization of a concern for which the implementation might otherwise cut across multiple
objects. Transaction management is a good example of a crosscutting concern in J2EE applications. Aspects
are implemented using Spring as Advisors or interceptors.
• Joinpoint: Point during the execution of a program, such as a method invocation or a particular exception
being thrown.
• Advice: Action taken by the AOP framework at a particular joinpoint. Different types of advice include
"around," "before" and "throws" advice. Advice types are discussed below. Many AOP frameworks,
including Spring, model an advice as an interceptor, maintaining a chain of interceptors "around" the
joinpoint.
• Pointcut: A set of joinpoints specifying when an advice should fire. An AOP framework must allow
developers to specify pointcuts: for example, using regular expressions.

• Introduction: Adding methods or fields to an advised class. Spring allows you to introduce new interfaces
to any advised object. For example, you could use an introduction to make any object implement an
IsModified interface, to simplify caching.
• Target object: Object containing the joinpoint. Also referred to as advised or proxied object.
• AOP proxy: Object created by the AOP framework, including advice. In Spring, an AOP proxy will be a
JDK dynamic proxy or a CGLIB proxy.
• Weaving: Assembling aspects to create an advised object. This can be done at compile time (using the
AspectJ compiler, for example), or at runtime. Spring, like other pure Java AOP frameworks, performs
weaving at runtime.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值