From ccd12a51ab0b30415eeb3e251f136ab7c2f428f1 Mon Sep 17 00:00:00 2001 From: tianxiangyu <96164429+FlyJingFish@users.noreply.github.com> Date: Wed, 30 Oct 2024 18:05:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/FAQ.md | 20 +++++++++----------- docs/zh/FAQ.md | 8 ++++---- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 941fae5a..3a29ecfc 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -2,10 +2,8 @@ - When multiple aspects are superimposed on a method, annotations take precedence over matching aspects, and annotation aspects are executed from top to bottom -- The next aspect will be executed only after * - *[proceed](https://flyjingfish.github.io/AndroidAOP/ProceedJoinPoint/)** is called, and the - code in the aspect method will be called only after * - *[proceed](https://flyjingfish.github.io/AndroidAOP/ProceedJoinPoint/)** is executed on the +- The next aspect will be executed only after **[proceed](https://flyjingfish.github.io/AndroidAOP/ProceedJoinPoint/)** is called, and the + code in the aspect method will be called only after **[proceed](https://flyjingfish.github.io/AndroidAOP/ProceedJoinPoint/)** is executed on the last aspect among multiple aspects - Calling **[proceed(args)](https://flyjingfish.github.io/AndroidAOP/ProceedJoinPoint/)** in the previous aspect can update the parameters passed in the method, and the updated parameters of @@ -127,14 +125,14 @@ The aspect processing class is bound to the corresponding method of the class, w into two cases - a. If the pointcut method is **not static** -- The aspect processing class will be recycled as the object where the method is located is - recycled, but this is not timely; the recycling time is when any other aspect is processed. -- And each object's pointcut method corresponds to an object of the aspect processing class, that - is, there are as many objects as the class where the pointcut method is located creates. + - The aspect processing class will be recycled as the object where the method is located is + recycled, but this is not timely; the recycling time is when any other aspect is processed. + - And each object's pointcut method corresponds to an object of the aspect processing class, that + is, there are as many objects as the class where the pointcut method is located creates. - b. If the pointcut method is **static** -- Because the aspect method is static, the aspect processing class will always exist once it is - created. -- And a class method only corresponds to one aspect processing class + - Because the aspect method is static, the aspect processing class will always exist once it is + created. + - And a class method only corresponds to one aspect processing class No matter which type a or b is, the aspect processing class object will only be created when the method is executed. diff --git a/docs/zh/FAQ.md b/docs/zh/FAQ.md index 5f7fc061..9e8812b0 100644 --- a/docs/zh/FAQ.md +++ b/docs/zh/FAQ.md @@ -112,11 +112,11 @@ class MatchTestMatchMethod : MatchClassMethod { 切面处理类与类的对应方法绑定在一起,分为两种情况 - a、如果切点方法 **不是静态的** - - 切面处理类会随着方法所在对象的回收而回收,但这不是及时的;回收时机是其他任意一个切面处理时才进行回收。 - - 并且每一个对象的切点方法各自对应一个切面处理类的对象,也就是说一个切点方法的所在类创建了多少个对象,就有多少个切面处理类对象。 + - 切面处理类会随着方法所在对象的回收而回收,但这不是及时的;回收时机是其他任意一个切面处理时才进行回收。 + - 并且每一个对象的切点方法各自对应一个切面处理类的对象,也就是说一个切点方法的所在类创建了多少个对象,就有多少个切面处理类对象。 - b、如果切点方法 **是静态的** - - 切面方法因为是静态的,所以切面处理类一旦被创建会一直存在。 - - 并且一个类方法只对应一个切面处理类 + - 切面方法因为是静态的,所以切面处理类一旦被创建会一直存在。 + - 并且一个类方法只对应一个切面处理类 不管是a、b哪种类型,切面处理类对象只有在方法被执行时才会被创建出来。