All Projects → zhangke3016 → Methodinterceptproxy

zhangke3016 / Methodinterceptproxy

MethodInterceptProxy for Android.It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Methodinterceptproxy

Lithium
li₃ is the fast, flexible and most RAD development framework for PHP
Stars: ✭ 1,176 (+840.8%)
Mutual labels:  aop
Agentframework
An elegant & efficient TypeScript metaprogramming API to build software agents
Stars: ✭ 97 (-22.4%)
Mutual labels:  aop
Audiovideocodec
一款视频录像机,支持AudioRecord录音、MediaCodec输出AAC、MediaMuxer合成音频视频并输出mp4,支持自动对焦、屏幕亮度调节、录制视频时长监听、手势缩放调整焦距等
Stars: ✭ 113 (-9.6%)
Mutual labels:  aop
Postsharp.samples
PostSharp Samples
Stars: ✭ 84 (-32.8%)
Mutual labels:  aop
Aspectcore Framework
AspectCore is an AOP-based cross platform framework for .NET Standard.
Stars: ✭ 1,318 (+954.4%)
Mutual labels:  aop
Koala
从 Java 字节码到 ASM 实践
Stars: ✭ 103 (-17.6%)
Mutual labels:  aop
Thunder
Stars: ✭ 70 (-44%)
Mutual labels:  aop
Ibase4j
Spring,SpringBoot 2.0,SpringMVC,Mybatis,mybatis-plus,motan/dubbo分布式,Redis缓存,Shiro权限管理,Spring-Session单点登录,Quartz分布式集群调度,Restful服务,QQ/微信登录,App token登录,微信/支付宝支付;日期转换、数据类型转换、序列化、汉字转拼音、身份证号码验证、数字转人民币、发送短信、发送邮件、加密解密、图片处理、excel导入导出、FTP/SFTP/fastDFS上传下载、二维码、XML读写、高精度计算、系统配置工具类等等。
Stars: ✭ 1,548 (+1138.4%)
Mutual labels:  aop
Swifthook
A library to hook methods in Swift and Objective-C.
Stars: ✭ 93 (-25.6%)
Mutual labels:  aop
Uioc
IoC Framework for us
Stars: ✭ 112 (-10.4%)
Mutual labels:  aop
Jeeplatform
一款企业信息化开发基础平台,拟集成OA(办公自动化)、CMS(内容管理系统)等企业系统的通用业务功能 JeePlatform项目是一款以SpringBoot为核心框架,集ORM框架Mybatis,Web层框架SpringMVC和多种开源组件框架而成的一款通用基础平台,代码已经捐赠给开源中国社区
Stars: ✭ 1,285 (+928%)
Mutual labels:  aop
Python Aspectlib
An aspect-oriented programming, monkey-patch and decorators library. It is useful when changing behavior in existing code is desired. It includes tools for debugging and testing: simple mock/record and a complete capture/replay framework.
Stars: ✭ 90 (-28%)
Mutual labels:  aop
Crepecake
An compile-time aop engine like AspectJ but easier to use in android application development.
Stars: ✭ 103 (-17.6%)
Mutual labels:  aop
Use Axios Well
axios请求超时,设置重新请求的完美解决方法
Stars: ✭ 74 (-40.8%)
Mutual labels:  aop
Jaop
jaop is a gradle plugin base on javassist&asm for android aop
Stars: ✭ 115 (-8%)
Mutual labels:  aop
Sandhook
Android ART Hook/Native Inline Hook/Single Instruction Hook - support 4.4 - 11.0 32/64 bit - Xposed API Compat
Stars: ✭ 1,172 (+837.6%)
Mutual labels:  aop
Laravel Aspect
aspect oriented programming Package for laravel framework
Stars: ✭ 98 (-21.6%)
Mutual labels:  aop
Puresharp
Puresharp is a Framework that provides the essential APIs (AOP, IOC, etc...) to productively build high quality (.NET 4.5.2+ & .NET Core 2.1+) applications through reliability, scalability and performance without no compromise
Stars: ✭ 120 (-4%)
Mutual labels:  aop
Framework
💎 Go! AOP PHP - modern aspect-oriented framework for the new level of software development
Stars: ✭ 1,559 (+1147.2%)
Mutual labels:  aop
Myth
Reliable messages resolve distributed transactions
Stars: ✭ 1,470 (+1076%)
Mutual labels:  aop

MethodInterceptProxy

基于dexmaker的Android切面拦截框架。

MethodInterceptProxy for Android.It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access. API compatible with Android 2.3+

Usage

java

  Enhancer enhancer = new Enhancer(this);
        enhancer.setSuperclass(Test.class);
        enhancer.setCallback(new MethodInterceptor() {
            @Override
            public Object intercept(Object object, Object[] args, MethodProxy methodProxy) throws Exception {
                Log.e("TAG","intercept  -- before---");
                Object obj = methodProxy.invokeSuper(object, args);
                Log.e("TAG","intercept  -- after---");
                return obj;
            }
        });
        Test test = (Test) enhancer.create();

        test.toast2(this);

More use

 Enhancer enhancer = new Enhancer(this);
        enhancer.setSuperclass(Test.class);
        enhancer.setCallbacks(new MethodInterceptor[]{NoOp.INSTANCE,new MethodInterceptor() {
            @Override
            public Object intercept(Object object, Object[] args, MethodProxy methodProxy) throws Exception {
                Log.e("TAG","intercept  -- before---");
                Object obj = methodProxy.invokeSuper(object, args);
                Log.e("TAG","intercept  -- after---");
                return obj;
            }
           }
        });
        enhancer.setCallbackFilter(new CallbackFilter() {
            @Override
            public int accept(Method method) {
                if (method.getName().equals("toast2"))
                    return 1;
                return 0;
            }
        });
        Test test = (Test) enhancer.create();

        test.toast3(this);

About me

An Android Developer in ZhengZhou.

我的简书地址

我的CSDN地址


Thanks


cglib

dexmaker

CGLib-for-Android

License


Copyright 2016 zhangke

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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].