-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
supported set field and getWithException
- Loading branch information
Showing
8 changed files
with
137 additions
and
41 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,6 @@ public interface ActivityThread { | |
int CREATE_SERVICE(); | ||
} | ||
} | ||
} | ||
``` | ||
#### 2. build一次,让我生成相关的代码。 | ||
|
||
|
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
26 changes: 26 additions & 0 deletions
26
app/src/main/java/top/niunaijun/blackreflection/ref/MainActivity.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,26 @@ | ||
package top.niunaijun.blackreflection.ref; | ||
|
||
import top.niunaijun.blackreflection.annotation.BClass; | ||
import top.niunaijun.blackreflection.annotation.BField; | ||
import top.niunaijun.blackreflection.annotation.BMethod; | ||
import top.niunaijun.blackreflection.annotation.BStaticField; | ||
|
||
/** | ||
* Created by Milk on 2022/2/16. | ||
* * ∧_∧ | ||
* (`・ω・∥ | ||
* 丶 つ0 | ||
* しーJ | ||
* 此处无Bug | ||
*/ | ||
@BClass(top.niunaijun.blackreflection.MainActivity.class) | ||
public interface MainActivity { | ||
@BStaticField | ||
String TAGStatic(); | ||
|
||
@BField | ||
String TAGContext(); | ||
|
||
@BMethod | ||
void test(); | ||
} |
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
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
20 changes: 20 additions & 0 deletions
20
core/src/main/java/top/niunaijun/blackreflection/annotation/BFieldSetNotProcess.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,20 @@ | ||
package top.niunaijun.blackreflection.annotation; | ||
|
||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
/** | ||
* Created by Milk on 2022/2/15. | ||
* * ∧_∧ | ||
* (`・ω・∥ | ||
* 丶 つ0 | ||
* しーJ | ||
* 此处无Bug | ||
*/ | ||
@Retention(RUNTIME) | ||
@Target({METHOD}) | ||
public @interface BFieldSetNotProcess { | ||
} |