Skip to content
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

Support searching class through annotations in DexClassFinder #1

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spianmo
Copy link

@spianmo spianmo commented Nov 5, 2023

支持在searchClass时使用annotations<EventSubscriber>()或者annotations("com.teamhelper.imsdk.base.EventSubscriber")的形式筛选出添加了某些注解的Class

package com.teamhelper.imsdk.base

class EventLifecycleSubscriber

@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.CLASS)
annotation class EventSubscriber

classLoader.searchClass(context) {
  extends<EventLifecycleSubscriber>()
  annotations<EventSubscriber>()
  ..or..
  annotations("com.teamhelper.imsdk.base.EventSubscriber")
}

@fankes
Copy link
Member

fankes commented Nov 6, 2023

感谢你的 PR,但是这个功能我不打算维护了,你可以看看 DexKit

@spianmo
Copy link
Author

spianmo commented Nov 6, 2023

感谢你的 PR,但是这个功能我不打算维护了,你可以看看 DexKit

OK

@DreamMoonCai
Copy link

我将您的想法修改增加到了KYukiReflection中

@DreamMoonCai
Copy link

@fankes fankes marked this pull request as draft March 5, 2025 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants