-
Notifications
You must be signed in to change notification settings - Fork 282
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
Showing
50 changed files
with
1,772 additions
and
189 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
Binary file not shown.
Binary file not shown.
35 changes: 35 additions & 0 deletions
35
base-lib-allcommon/src/main/java/com/virjar/ratel/allcommon/ClassNames.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,35 @@ | ||
package com.virjar.ratel.allcommon; | ||
|
||
/** | ||
* 多个模块部件相互关联,通过多个部件无法在同一个classloader直接引用和检查所有的class<br> | ||
* 所以className在这里管理,如果未来ratel存在对抗,需要修改className,那么需要同步修改这张表 | ||
*/ | ||
public enum ClassNames { | ||
BUILDER_HELPER_MAIN("com.virjar.ratel.builder.helper.Main"), | ||
BUILDER_MAIN("com.virjar.ratel.builder.ratelentry.Main"), | ||
INJECT_REBUILD_BOOTSTRAP("com.virjar.ratel.inject.template.rebuild.BootStrap"), | ||
INJECT_REBUILD_BOOTSTRAP_CINT("com.virjar.ratel.inject.template.rebuild.BootStrapWithStaticInit"), | ||
|
||
|
||
INJECT_TOOL_SMALI_LOG("com.virjar.ratel.inject.template.RatelSmaliLog"), | ||
INJECT_TOOL_EVENT_NOTIFIER("com.virjar.ratel.inject.template.EventNotifier"), | ||
|
||
|
||
; | ||
|
||
ClassNames(String className) { | ||
this.className = className; | ||
} | ||
|
||
private final String className; | ||
|
||
public void check(Class<?> clazz) { | ||
if (!clazz.getName().equals(className)) { | ||
throw new IllegalStateException("class name define error-> expected: " + className + " actually: " + clazz.getName()); | ||
} | ||
} | ||
|
||
public String getClassName() { | ||
return className; | ||
} | ||
} |
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
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
Oops, something went wrong.