Skip to content

Commit

Permalink
1、修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyJingFish committed Oct 24, 2024
1 parent 478a551 commit d46a236
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 40 deletions.
10 changes: 6 additions & 4 deletions docs/AndroidAopCollectMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ This aspect collects inherited classes or classes that match regular expressions
``` mermaid
graph LR
C[C class] ---> |C class inherits from B class| B{ B class };
B --->|B class inherits from A class| A[ A class];
B --->|DIRECT_EXTENDS / EXTENDS| A[ A class];
C ---->|LEAF_EXTENDS / EXTENDS| A[ A class];
C(Class C) ---> |Class C inherits from Class B| B{Class B};
B --->|Class B inherits from Class A| A[Class A];
B --->|DIRECT_EXTENDS / EXTENDS| A;
C ---->|LEAF_EXTENDS / EXTENDS| A;
D(Class D) --->|Class D inherits from Class A| A;
D --->|DIRECT_EXTENDS/ LEAF_EXTENDS / EXTENDS| A;
```

### regex fill in `Regular expression`
Expand Down
10 changes: 6 additions & 4 deletions docs/AndroidAopMatchClassMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ This aspect is used to match a class and its corresponding method. This aspect f

``` mermaid
graph LR
C[C class] ---> |C class inherits from B class| B{ B class };
B --->|B class inherits from A class| A[ A class];
B --->|DIRECT_EXTENDS / EXTENDS| A[ A class];
C ---->|LEAF_EXTENDS / EXTENDS| A[ A class];
C(Class C) ---> |Class C inherits from Class B| B{Class B};
B --->|Class B inherits from Class A| A[Class A];
B --->|DIRECT_EXTENDS / EXTENDS| A;
C ---->|LEAF_EXTENDS / EXTENDS| A;
D(Class D) --->|Class D inherits from Class A| A;
D --->|DIRECT_EXTENDS/ LEAF_EXTENDS / EXTENDS| A;
```

Simply put, ```LEAF_EXTENDS``` and ```DIRECT_EXTENDS``` are two extremes. The former focuses on the last node in the inheritance relationship, while the latter focuses on the first node in the inheritance relationship. Also note that ```EXTENDS``` This type of match has a wide range, and all inherited intermediate classes may also add aspect codes
Expand Down
10 changes: 6 additions & 4 deletions docs/AndroidAopReplaceClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ This aspect is used to replace the method call in the code, and needs to be used

``` mermaid
graph LR
C[C class] ---> |C class inherits from B class| B{ B class };
B --->|B class inherits from A class| A[ A class];
B --->|DIRECT_EXTENDS / EXTENDS| A[ A class];
C ---->|LEAF_EXTENDS / EXTENDS| A[ A class];
C(Class C) ---> |Class C inherits from Class B| B{Class B};
B --->|Class B inherits from Class A| A[Class A];
B --->|DIRECT_EXTENDS / EXTENDS| A;
C ---->|LEAF_EXTENDS / EXTENDS| A;
D(Class D) --->|Class D inherits from Class A| A;
D --->|DIRECT_EXTENDS/ LEAF_EXTENDS / EXTENDS| A;
```

In simple terms, ```LEAF_EXTENDS``` and ```DIRECT_EXTENDS``` are two extremes. The former focuses on the last node in the inheritance relationship, while the latter focuses on the first node in the inheritance relationship.
Expand Down
16 changes: 8 additions & 8 deletions docs/ProceedJoinPoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ When there are multiple annotations or matching aspects for the same method, `pr

``` mermaid
graph LR
X[call method] ---> |enter section| A[annotation A];
A[annotation A] ---> |proceed| B[annotation B];
B ---> |proceed| C[annotation C];
B ---> |return without calling proceed| X;
C ---> |return after asynchronous proceed will directly return to the call site, but will continue the logic of the next section| X;
C ---> |proceed 「including asynchronous」| D[matching section];
D ---> |proceed| E[execute original method];
E ---> |return| X;
X[call method] --> |enter section| A[annotation A];
A[annotation A] --> |proceed| B[annotation B];
B --> |proceed| C[annotation C];
B --> |return without calling proceed| X;
C --> |return after asynchronous proceed will directly return to the call site, but will continue the logic of the next section| X;
C --> |proceed 「including asynchronous」| D[matching section];
D --> |proceed| E[execute original method];
E --> |return| X;
```

#### 3. `ProceedJoinPointSuspend`'s `proceed` method
Expand Down
10 changes: 6 additions & 4 deletions docs/zh/AndroidAopCollectMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@
``` mermaid
graph LR
C[C 类] ---> |C类继承于B类| B{ B 类 };
B --->|B类继承于A类| A[ A 类];
B --->|DIRECT_EXTENDS / EXTENDS| A[ A 类];
C ---->|LEAF_EXTENDS / EXTENDS| A[ A 类];
C(C 类) ---> |C类继承于B类| B{ B 类 };
B --->|B类继承于A类| A[A 类];
B --->|DIRECT_EXTENDS / EXTENDS| A;
C ---->|LEAF_EXTENDS / EXTENDS| A;
D(D 类) --->|D类继承于A类| A;
D --->|DIRECT_EXTENDS/ LEAF_EXTENDS / EXTENDS| A;
```


Expand Down
10 changes: 6 additions & 4 deletions docs/zh/AndroidAopMatchClassMethod.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@

``` mermaid
graph LR
C[C 类] ---> |C类继承于B类| B{ B 类 };
B --->|B类继承于A类| A[ A 类];
B --->|DIRECT_EXTENDS / EXTENDS| A[ A 类];
C ---->|LEAF_EXTENDS / EXTENDS| A[ A 类];
C(C 类) ---> |C类继承于B类| B{ B 类 };
B --->|B类继承于A类| A[A 类];
B --->|DIRECT_EXTENDS / EXTENDS| A;
C ---->|LEAF_EXTENDS / EXTENDS| A;
D(D 类) --->|D类继承于A类| A;
D --->|DIRECT_EXTENDS/ LEAF_EXTENDS / EXTENDS| A;
```

简单来说,```LEAF_EXTENDS``````DIRECT_EXTENDS```是两个极端,前者关注的是继承关系中最后一个节点,后者关注的是继承关系中第一个节点。另外注意 ```EXTENDS``` 这种匹配类型范围比较大,所有继承的中间类也可能会加入切面代码
Expand Down
10 changes: 6 additions & 4 deletions docs/zh/AndroidAopReplaceClass.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@

``` mermaid
graph LR
C[C 类] ---> |C类继承于B类| B{ B 类 };
B --->|B类继承于A类| A[ A 类];
B --->|DIRECT_EXTENDS / EXTENDS| A[ A 类];
C ---->|LEAF_EXTENDS / EXTENDS| A[ A 类];
C(C 类) ---> |C类继承于B类| B{ B 类 };
B --->|B类继承于A类| A[A 类];
B --->|DIRECT_EXTENDS / EXTENDS| A;
C ---->|LEAF_EXTENDS / EXTENDS| A;
D(D 类) --->|D类继承于A类| A;
D --->|DIRECT_EXTENDS/ LEAF_EXTENDS / EXTENDS| A;
```

简单来说,```LEAF_EXTENDS``````DIRECT_EXTENDS```是两个极端,前者关注的是继承关系中最后一个节点,后者关注的是继承关系中第一个节点。
Expand Down
16 changes: 8 additions & 8 deletions docs/zh/ProceedJoinPoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@

``` mermaid
graph LR
X[调用方法] ---> |进入切面| A[注解A];
A[注解A] ---> |proceed| B[注解B];
B ---> |proceed| C[注解C];
B ---> |不调用proceed直接return| X;
C ---> |异步proceed之后return会直接返回调用处,但仍会继续下一个切面的逻辑| X;
C ---> |proceed「包括异步」| D[匹配切面];
D ---> |proceed| E[执行原方法];
E ---> |return| X;
X[调用方法] --> |进入切面| A[注解A];
A[注解A] --> |proceed| B[注解B];
B --> |proceed| C[注解C];
B --> |不调用proceed直接return| X;
C --> |异步proceed之后return会直接返回调用处,但仍会继续下一个切面的逻辑| X;
C --> |proceed「包括异步」| D[匹配切面];
D --> |proceed| E[执行原方法];
E --> |return| X;
```

#### 3、`ProceedJoinPointSuspend``proceed` 方法
Expand Down

0 comments on commit d46a236

Please sign in to comment.