字节码插桩实战(Gradle + ASM)
发布时间
阅读量:
阅读量
input.jarInputs.each { JarInput jarInput ->
handleJarInput(jarInput, outputProvider)
}
}
}
/**
- 处理文件目录下的class文件
*/
A static method named processDirectoryInput is defined to handle the input of DirectoryInput and TransformOutputProvider objects.
//是否是目录
if (directoryInput.file.isDirectory()) {
//列出目录所有文件(包含子文件夹,子文件夹内文件)
directoryInput.file.eachFileRecurse { File file ->
def name = file.name
if (filterClass(name)) {
ClassReader classReader = new ClassReader(file.bytes)
An instance of ClassWriter is created using classReader and its COMPUTE_MAXS property value.
ClassVisitor cl
全部评论 (0)
还没有任何评论哟~
