feat: Introduce black-reflection and compiler modules, integrate reflection utilities, and update core components.

This commit is contained in:
alex5402
2026-01-30 18:24:57 +05:30
parent 5a557f1521
commit e779247466
70 changed files with 2424 additions and 6069 deletions
@@ -0,0 +1,39 @@
package top.niunaijun.blackreflection.utils;
import top.niunaijun.blackreflection.annotation.BClass;
import top.niunaijun.blackreflection.annotation.BClassName;
import top.niunaijun.blackreflection.annotation.BClassNameNotProcess;
/**
* on 2022/2/18.
* * ∧_∧
* (`・ω・∥
* 丶 つ0
* しーJ
* 此处无Bug
*/
public class ClassUtil {
public static Class<?> classReady(Class<?> clazz) {
BClassNameNotProcess bClassNameNotProcess = clazz.getAnnotation(BClassNameNotProcess.class);
if (bClassNameNotProcess != null) {
return classReady(bClassNameNotProcess.value());
}
BClass annotation = clazz.getAnnotation(BClass.class);
if (annotation != null) {
return annotation.value();
}
BClassName bClassName = clazz.getAnnotation(BClassName.class);
if (bClassName != null) {
return classReady(bClassName.value());
}
return null;
}
private static Class<?> classReady(String clazz) {
try {
return Class.forName(clazz);
} catch (ClassNotFoundException ignored) {
}
return null;
}
}