We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如android原生View存在以下方法:
/** {@hide} */ @CallSuper protected void encodeProperties(@NonNull ViewHierarchyEncoder stream) { // ...... }
其传入参数 ViewHierarchyEncoder 也存在@hide注解
而我写了以下方法均不生效
@Insert(value = "encodeProperties") @TargetClass(value = "android.view.View") protected void _encodeProperties(ViewHierarchyEncoder stream) { Log.d(TAG, "_encodeProperties_1: android.view.View.encodeProperties(ViewHierarchyEncoder stream)"); Origin.callVoid(); } @Insert(value = "encodeProperties") // @Proxy("encodeProperties") @TargetClass(value = "android.view.View", scope = Scope.ALL) protected void _encodeProperties(@ClassOf("android.view.ViewHierarchyEncoder") Object stream) { Log.d(TAG, "_encodeProperties_2: android.view.View.encodeProperties(ViewHierarchyEncoder stream)"); Origin.callVoid(); }
我的理解是@hide会使得类或者方法不参与编译,这种情况是不是就不能使用lancet进行代码织入了呢?
The text was updated successfully, but these errors were encountered:
跟是否hide无关, 因为Insert的方式 是直接修改目标类, 因此 对于 jdk 和android sdk的代码,因为它们并不参与apk的构建,并不会并打包到你的APK中,所以你的修改是无效的
Sorry, something went wrong.
No branches or pull requests
如android原生View存在以下方法:
其传入参数 ViewHierarchyEncoder 也存在@hide注解
而我写了以下方法均不生效
我的理解是@hide会使得类或者方法不参与编译,这种情况是不是就不能使用lancet进行代码织入了呢?
The text was updated successfully, but these errors were encountered: