Javadream

          A long way and a dream.

          Aop的幾個術語 (轉)

          Posted on 2006-07-08 10:02 oxl 閱讀(129) 評論(0)  編輯  收藏 所屬分類: 技術感語
          從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.
          主站蜘蛛池模板: 桂平市| 牙克石市| 修水县| 萨迦县| 略阳县| 江永县| 即墨市| 六枝特区| 文安县| 临西县| 吉林市| 阿拉善左旗| 巧家县| 阳东县| 栾川县| 清苑县| 明水县| 边坝县| 古蔺县| 如东县| 宣城市| 隆子县| 宁德市| 毕节市| 金山区| 陆丰市| 龙岩市| 长寿区| 宣武区| 铁岭市| 丹江口市| 镇远县| 阜平县| 昔阳县| 永新县| 聊城市| 万安县| 德化县| 宁武县| 丰台区| 铜川市|