-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我适配了2.5.4,大大简化了注入逻辑 #136
Comments
只要设置一下 Procedure 的 parent 然后 将对应的 Procedure 传到 InstanceInvocation 即可完成转换, 具体可以参考我的fork // ...
//目标新建stub函数,方便完成目标->aopstub->目标stub链路
final Procedure originalStubProcedure = AopUtils.createStubProcedure(
Name(originalProcedure.name.text + '_' + stubKey, originalProcedure.name.library),
aopItemInfo,
originalProcedure,
body,
shouldReturn,
)..parent = originalProcedure.parent;
// ...
final mockedInvocation = InstanceInvocation(
InstanceAccessKind.Instance,
AsExpression(
AopUtils.getPointCutClassInstanceGet(pointcutClass, 'target'),
InterfaceType(originalClass, Nullability.nonNullable),
),
originalStubProcedure.name,
AopUtils.concatArguments4PointcutStubCall(originalProcedure),
interfaceTarget: originalStubProcedure,
functionType: originalStubProcedure.getterType as FunctionType
);
//... |
目前已经迁移了 call execute (构造器 hook 没搞,暂时用不到, 实例方法和静态方法简单测了 可以用) |
2.5.4版本在哪里下的?我看flutter最新版本只支持到了2.5.3呀 |
2.5.4版本在哪里下的呀,我看最新版本只支持到了2.5.3呀 |
flutter是 2.5.3 |
项目地址https://github.com/lancexin/aspect_frontend_server
现在暂时只支持execute模式
该方法和aspectd的区别
为什么用pragma注解,而不是自定义注解?
本项目是在aot优化后再对字节码进行修改,aot优化后只有白名单中的注解才能被识别到,pragma是在白名单中的注解.
The text was updated successfully, but these errors were encountered: