63

基于AST的组件化自动插桩方案 - 简书

 6 years ago
source link: https://www.jianshu.com/p/a827a95fde17?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
本文将带你实现一个一百多行代码实现的自动化插桩方案,解决组件化子模块的初始化和路由器的自动注册,支持多种类型的插桩、支持前插后插、支持插入代码的优先级设置。我们将使用编辑器的API来操作AST实现代码插桩,而非重量级的编译器(Aspectj)或者Gradle插件(ASM/Javassisit)。 第一步,定义AST注解: 第二步,实现注解处理器 解读:1、使用mSources存储插桩类型对应...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK