类 AbsMainProcessPlugin<E extends BaseExtension>

    • 构造器详细资料

      • AbsMainProcessPlugin

        public AbsMainProcessPlugin()
    • 方法详细资料

      • traverse

        public void traverse​(@Nonnull
                             java.lang.String relativePath,
                             @Nonnull
                             ClassVisitorChain chain)
        从接口复制的说明: MainProcessHandler
        遍历工程中所有的class Traverse all classes in the whole project.
        指定者:
        traverse 在接口中 MainProcessHandler
        参数:
        relativePath - class的相对路径。 relative path of class
        chain - ClassVisitorChain用于加入自定义的ClassVisitor。 ASM visitor api. ClassVisitorChain is used for appending your custom ClassVisitor.
      • traverseAndroidJar

        public void traverseAndroidJar​(@Nonnull
                                       java.lang.String relativePath,
                                       @Nonnull
                                       ClassVisitorChain chain)
        从接口复制的说明: MainProcessHandler
        遍历android.jar中所有的class Traverse all classes in android.jar.
        指定者:
        traverseAndroidJar 在接口中 MainProcessHandler
        参数:
        relativePath - class的相对路径。 relative path of class
        chain - ClassVisitorChain用于加入自定义的ClassVisitor。 ASM visitor api. ClassVisitorChain is used for appending your custom ClassVisitor.
      • traverse

        public void traverse​(@Nonnull
                             java.lang.String relativePath,
                             @Nonnull
                             org.objectweb.asm.tree.ClassNode node)
        从接口复制的说明: MainProcessHandler
        遍历工程中所有的class Traverse all classes in the whole project.
        指定者:
        traverse 在接口中 MainProcessHandler
        参数:
        relativePath - class的相对路径。 relative path of class
        node - class的数据结构(照顾喜欢用tree api的同学)。 ASM tree api.
      • traverseAndroidJar

        public void traverseAndroidJar​(@Nonnull
                                       java.lang.String relativePath,
                                       @Nonnull
                                       org.objectweb.asm.tree.ClassNode node)
        从接口复制的说明: MainProcessHandler
        遍历android.jar中所有的class Traverse all classes in android.jar.
        指定者:
        traverseAndroidJar 在接口中 MainProcessHandler
        参数:
        relativePath - class的相对路径。 relative path of class
        node - class的数据结构(照顾喜欢用tree api的同学)。 ASM tree api.
      • transform

        public boolean transform​(@Nonnull
                                 java.lang.String relativePath,
                                 @Nonnull
                                 ClassVisitorChain chain)
        从接口复制的说明: MainProcessHandler
        handle 工程中的所有class To process all classed in the whole project.
        指定者:
        transform 在接口中 MainProcessHandler
        参数:
        relativePath - class的相对路径。 relative path of class
        chain - ClassVisitorChain用于注册自定义的ClassVisitor。 ASM visitor api. ClassVisitorChain is used for appending your custom ClassVisitor.
        返回:
        if false, this class file would be deleted, otherwise it would be output after transform.
      • transform

        public boolean transform​(@Nonnull
                                 java.lang.String relativePath,
                                 @Nonnull
                                 org.objectweb.asm.tree.ClassNode node)
        从接口复制的说明: MainProcessHandler
        handle 工程中的所有class To process all classed in the whole project.
        指定者:
        transform 在接口中 MainProcessHandler
        参数:
        relativePath - class的相对路径。 relative path of class
        node - class的数据结构(照顾喜欢用tree api的同学)。。 ASM tree api.
        返回:
        if false, this class file would be deleted, otherwise it would be output after transform.
      • afterTransform

        public void afterTransform​(@Nonnull
                                   TransformEngine engine)
        从接口复制的说明: MainProcessHandler
        用于transform完成后,进行各种illegal check It's usually used for plugin's custom illegal check after transform.
        指定者:
        afterTransform 在接口中 MainProcessHandler
        参数:
        engine - from TransformEngine
      • registerTransformFlow

        @Nonnull
        public final TransformFlow registerTransformFlow​(@Nonnull
                                                         MainTransformFlow mainFlow,
                                                         @Nonnull
                                                         TransformContext transformContext)
        Each ByteX plugin can have its own TransformFlow, and the return value of this method determines which flow the plugin runs in.
        We mark it as final because TransformFlow should register only once
        指定者:
        registerTransformFlow 在接口中 IPlugin
        参数:
        mainFlow - 全局的MainTransformFlow。The global MainTransformFlow
        返回:
        当前插件关联的TransformFlow,通常返回mainFlow就可以。如果想让插件通过单独一个TransformFlow处理class文件, 这个方法需要另外return 新的TransformFlow(可以是自定义的TransformFlow,也可以new 一个MainTransformFlow)。 If this plugin is related to the global MainTransformFlow, just return `mainFlow` is OK. If you want to handle class files with a single TransformFlow, you should return a new TransformFlow. If so, this new TransformFlow would only contain this plugin.
      • process

        public java.util.List<FileProcessor> process​(Process process)
        从接口复制的说明: MainProcessHandler
        在traverse和transform的过程中,加入自定义的FileProcessor,提供更大的灵活性。 Add custom FileProcessor during traverse or transform.
        指定者:
        process 在接口中 MainProcessHandler
        参数:
        process - enum
        返回:
        list of FileProcessor
      • needPreVerify

        public boolean needPreVerify()
        从接口复制的说明: MainProcessHandler
        这个Handler是不是要求在真正执行前进行一次校验 Verify bytecode before transform.
        指定者:
        needPreVerify 在接口中 MainProcessHandler
        返回:
        if true, indicate that need to verify bytecode. Default is false.
      • needVerify

        public boolean needVerify()
        从接口复制的说明: MainProcessHandler
        在执行完这个Handler后是否需要进行一次校验 Verify bytecode after transform.
        指定者:
        needVerify 在接口中 MainProcessHandler
        返回:
        if true, indicate that need to verify bytecode. Default is false.
      • afterExecute

        public void afterExecute()
                          throws java.lang.Throwable
        从接口复制的说明: IPlugin
        插件执行执行结束后的回调,不管成功和失败都会执行.做一些数据回收处理工作
        指定者:
        afterExecute 在接口中 IPlugin
        覆盖:
        afterExecute 在类中 AbsPlugin<E extends BaseExtension>
        抛出:
        java.lang.Throwable