Skip to content

Commit

Permalink
1、修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyJingFish committed Oct 30, 2024
1 parent 5ee493f commit ccd12a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
20 changes: 9 additions & 11 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions docs/zh/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ class MatchTestMatchMethod : MatchClassMethod {
切面处理类与类的对应方法绑定在一起,分为两种情况

- a、如果切点方法 **不是静态的**
- 切面处理类会随着方法所在对象的回收而回收,但这不是及时的;回收时机是其他任意一个切面处理时才进行回收。
- 并且每一个对象的切点方法各自对应一个切面处理类的对象,也就是说一个切点方法的所在类创建了多少个对象,就有多少个切面处理类对象。
- 切面处理类会随着方法所在对象的回收而回收,但这不是及时的;回收时机是其他任意一个切面处理时才进行回收。
- 并且每一个对象的切点方法各自对应一个切面处理类的对象,也就是说一个切点方法的所在类创建了多少个对象,就有多少个切面处理类对象。
- b、如果切点方法 **是静态的**
- 切面方法因为是静态的,所以切面处理类一旦被创建会一直存在。
- 并且一个类方法只对应一个切面处理类
- 切面方法因为是静态的,所以切面处理类一旦被创建会一直存在。
- 并且一个类方法只对应一个切面处理类

不管是a、b哪种类型,切面处理类对象只有在方法被执行时才会被创建出来。

Expand Down

0 comments on commit ccd12a5

Please sign in to comment.