Skip to content

Commit

Permalink
更新README
Browse files Browse the repository at this point in the history
  • Loading branch information
HChenX committed Jul 23, 2024
1 parent 0b36c04 commit d844343
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,14 @@ public class MainTest extends BaseHC {
setThisField("demo", 1);
callThisMethod("method");
getThisField("test");
String result = callThisMethod("call", thisObject(), first());
// Non-static outside this class
Object o = null;
setField(o, "demo", 1);
callMethod(o, "method");
getField(o, "test");

// Static requires class
String result = callThisMethod("call", thisObject(), first());
callStaticMethod("com.demo.Main", "callStatic", thisObject(), second());
int i = getStaticField("com.demo.Main", "field");
setStaticField("com.demo.Main", "test", true);
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ public class MainTest extends BaseHC {
setThisField("demo", 1);
callThisMethod("method");
getThisField("test");
String result = callThisMethod("call", thisObject(), first());
// 非静态本类外
Object o = null;
setField(o, "demo", 1);
callMethod(o, "method");
getField(o, "test");

// 静态需要 class
String result = callThisMethod("call", thisObject(), first());
callStaticMethod("com.demo.Main", "callStatic", thisObject(), second());
int i = getStaticField("com.demo.Main", "field");
setStaticField("com.demo.Main", "test", true);
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/hchen/hooktool/MainTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,14 @@ public void before() throws Throwable {
setThisField("demo", 1);
callThisMethod("method");
getThisField("test");
String result = callThisMethod("call", thisObject(), first());
// 非静态本类外
Object o = null;
setField(o, "demo", 1);
callMethod(o, "method");
getField(o, "test");

// 静态需要 class
String result = callThisMethod("call", thisObject(), first());
callStaticMethod("com.demo.Main", "callStatic", thisObject(), second());
int i = getStaticField("com.demo.Main", "field");
setStaticField("com.demo.Main", "test", true);
Expand Down

0 comments on commit d844343

Please sign in to comment.