摘要:
首发于Enaium的个人博客 继续使用上个文章的类容器 创建一个注解 @Target(ElementType.FIELD) @Retention(RetentionPolicy.RUNTIME) public @interface Autowired { } 遍历所有字段包括私有的 private 阅读全文
posted @ 2021-07-16 21:37
Enaium
阅读(942)
评论(0)
推荐(0)
摘要:
首发于Enaium的个人博客 新建2个类 public class Test1 { } public class Test2 { public void render() { System.out.println("Test2"); } } public class ClassContainer { 阅读全文
posted @ 2021-07-16 21:13
Enaium
阅读(87)
评论(0)
推荐(0)
摘要:
首发于Enaium的个人博客 public class WalkClasspathAllClasses { public static void main(String[] args) throws URISyntaxException, IOException { List<URL> urls = 阅读全文
posted @ 2021-07-16 10:26
Enaium
阅读(320)
评论(0)
推荐(0)
摘要:
首发于Enaium的个人博客 使用树API来生成一个类 public static void main(String[] args) { ClassWriter classWriter = new ClassWriter(ClassWriter.COMPUTE_MAXS); ClassNode cl 阅读全文
posted @ 2021-07-16 10:25
Enaium
阅读(92)
评论(0)
推荐(0)

浙公网安备 33010602011771号