All Projects → ltshddx → Jaop

ltshddx / Jaop

Licence: apache-2.0
jaop is a gradle plugin base on javassist&asm for android aop

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Jaop

Click Debounce
Using ASM to handle Android's click debounce, specially a quick double click.
Stars: ✭ 175 (+52.17%)
Mutual labels:  gradle-plugin, asm, aop
Laziertracker
本项目通过Android字节码插桩插件实现Android端无埋点(或自动埋点),并且支持根据配置文件实现业务数据的自动采集。
Stars: ✭ 485 (+321.74%)
Mutual labels:  gradle-plugin, asm, aop
Koala
从 Java 字节码到 ASM 实践
Stars: ✭ 103 (-10.43%)
Mutual labels:  gradle-plugin, asm, aop
Bytex
ByteX is a bytecode plugin platform based on Android Gradle Transform API and ASM. 字节码插件开发平台
Stars: ✭ 2,140 (+1760.87%)
Mutual labels:  gradle-plugin, asm
Androidautotrack
Android Asm 插桩 教学
Stars: ✭ 378 (+228.7%)
Mutual labels:  gradle-plugin, asm
Codeguide
📚 本代码库是作者小傅哥多年从事一线互联网 Java 开发的学习历程技术汇总,旨在为大家提供一个清晰详细的学习教程,侧重点更倾向编写Java核心内容。如果本仓库能为您提供帮助,请给予支持(关注、点赞、分享)!
Stars: ✭ 6,750 (+5769.57%)
Mutual labels:  asm, aop
Let
Annotation based simple API flavored with AOP to handle new Android runtime permission model
Stars: ✭ 532 (+362.61%)
Mutual labels:  gradle-plugin, aop
Methodtraceman
用于快速找到高耗时方法,定位解决Android App卡顿问题。通过gradle plugin+ASM实现可配置范围的方法插桩来统计所有方法的耗时,并提供友好的界面展示,支持耗时筛选、线程筛选、方法名筛选等。(A Tool for Discovering High Time-consuming Methods for Android App)
Stars: ✭ 1,258 (+993.91%)
Mutual labels:  gradle-plugin, asm
Hunter
A fast, incremental, concurrent framework to develop compile plugin for android project to manipulate bytecode
Stars: ✭ 999 (+768.7%)
Mutual labels:  gradle-plugin, asm
Module Service Manager
Android模块化/组件化通信框架
Stars: ✭ 58 (-49.57%)
Mutual labels:  gradle-plugin, asm
Androidanimationexercise
Android 动画各种实现,包括帧动画、补间动画和属性动画的总结分享
Stars: ✭ 1,254 (+990.43%)
Mutual labels:  gradle-plugin, asm
Audiovideocodec
一款视频录像机,支持AudioRecord录音、MediaCodec输出AAC、MediaMuxer合成音频视频并输出mp4,支持自动对焦、屏幕亮度调节、录制视频时长监听、手势缩放调整焦距等
Stars: ✭ 113 (-1.74%)
Mutual labels:  gradle-plugin, aop
Kordamp Gradle Plugins
A collection of Gradle plugins
Stars: ✭ 100 (-13.04%)
Mutual labels:  gradle-plugin
Kotlin
The Kotlin Programming Language.
Stars: ✭ 39,664 (+34390.43%)
Mutual labels:  gradle-plugin
Laravel Aspect
aspect oriented programming Package for laravel framework
Stars: ✭ 98 (-14.78%)
Mutual labels:  aop
Vertx Gradle Plugin
An opinionated Gradle plugin for Vert.x projects
Stars: ✭ 98 (-14.78%)
Mutual labels:  gradle-plugin
Licensetoolsplugin
Gradle plugin to check library licenses and generate license pages for Android
Stars: ✭ 113 (-1.74%)
Mutual labels:  gradle-plugin
Library Analysis
Library Analysis Gradle Plugin
Stars: ✭ 105 (-8.7%)
Mutual labels:  gradle-plugin
Gradle Quality Plugin
Gradle quality plugin for Java and Groovy
Stars: ✭ 97 (-15.65%)
Mutual labels:  gradle-plugin
Agentframework
An elegant & efficient TypeScript metaprogramming API to build software agents
Stars: ✭ 97 (-15.65%)
Mutual labels:  aop

jaop

jaop 是一个基于javassist和asm的gradle aop插件,可以在特定的方法调用处或方法体内 编程
javassist做简单的代码插入,asm做操作数栈分析和字节码的转录
不会新增任何方法,秒杀aspectj
兼容性更好
不支持instant run

配置

repositories {
  jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0' // 需要1.5及以上的plugin
    classpath 'jaop.gradle.plugin:gradle-plugin:1.0.4'
}

apply plugin: 'jaop'

用法

@Jaop  //配置文件的开关
public class JaopDemo {
    @After("demo.jaop.sample.MainActivity.onCreate")  // hook 掉onCreate 方法的方法体
    public void replace1(MethodBodyHook hook) {
        Button button = (Button) ((Activity) hook.getTarget()).findViewById(R.id.button);
        button.setText("text replace by jaop");
    }

    @Replace("android.widget.Toast.makeText") // hook Toast makeText 方法的调用处, 替换toast的文本
    public void replace2(MethodCallHook hook) {
        Object[] args = hook.getArgs();
        hook.setResult(Toast.makeText((Context)args[0], "hook toast", Toast.LENGTH_LONG)); // 设置返回值
    }
}

详情请看sample

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].