-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ad4c76
commit e4e2124
Showing
6 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/flyjingfish/androidaop/testReplace/BaseBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.flyjingfish.androidaop.testReplace; | ||
|
||
public class BaseBean { | ||
int num1; | ||
int num2; | ||
|
||
public BaseBean(int num1, int num2) { | ||
this.num1 = num1; | ||
this.num2 = num2; | ||
} | ||
|
||
public BaseBean(int num1) { | ||
this(num1,0); | ||
} | ||
|
||
public void test(){ | ||
|
||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
app/src/main/java/com/flyjingfish/androidaop/testReplace/BeanH.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.flyjingfish.androidaop.testReplace; | ||
|
||
public class BeanH extends BaseBean{ | ||
public BeanH(int num1, int num2) { | ||
super(num1, num2); | ||
} | ||
|
||
@Override | ||
public void test() { | ||
super.test(); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
app/src/main/java/com/flyjingfish/androidaop/testReplace/ReplaceBaseBean.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.flyjingfish.androidaop.testReplace | ||
|
||
import com.flyjingfish.android_aop_annotation.anno.AndroidAopReplaceClass | ||
import com.flyjingfish.android_aop_annotation.anno.AndroidAopReplaceMethod | ||
|
||
//@AndroidAopReplaceClass("com.flyjingfish.androidaop.testReplace.BaseBean") | ||
object ReplaceBaseBean { | ||
@AndroidAopReplaceMethod("<init>(int,int)") | ||
@JvmStatic | ||
fun getBaseBean(testBean: BaseBean) : BaseBean { | ||
return testBean | ||
} | ||
|
||
@AndroidAopReplaceMethod("void test()") | ||
@JvmStatic | ||
fun test(testBean: BaseBean){ | ||
testBean.test() | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/flyjingfish/androidaop/testReplace/ReplaceBaseBean2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.flyjingfish.androidaop.testReplace; | ||
|
||
import android.util.Log; | ||
|
||
import com.flyjingfish.android_aop_annotation.anno.AndroidAopReplaceClass; | ||
import com.flyjingfish.android_aop_annotation.anno.AndroidAopReplaceMethod; | ||
|
||
@AndroidAopReplaceClass("com.flyjingfish.androidaop.testReplace.BaseBean") | ||
public class ReplaceBaseBean2 { | ||
@AndroidAopReplaceMethod("<init>(int,int)") | ||
public static BaseBean getBaseBean(BaseBean testBean) { | ||
Log.e("ReplaceBaseBean2","getBaseBean"); | ||
return testBean; | ||
} | ||
|
||
@AndroidAopReplaceMethod("void test()") | ||
public static void test(BaseBean testBean){ | ||
Log.e("ReplaceBaseBean2","test"); | ||
testBean.test(); | ||
} | ||
} |