-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Detect TYPE_USE annotations for extended or implemented classes #662
Comments
@raner Thanks for the request. I don't even know what this sort of annotation is called. Was this annotation feature released as part of type annotation support? Here is where type annotations are added to classes after
So this should work... I'll write a unit test and try to figure out what's wrong... |
OK, I figured out where this is breaking down... If you use
then you can get the annotated However in this case, for the example you gave, the class has no generic type signature, because it's not a generic class. In this case, I have no idea where to store the type annotations for the superclass or interface -- these are usually attached to a type signature. And classes don't have a non-generic type descriptor like methods or fields do. The type annotation can't be attached to I think the right thing to do in this case is to add a Any ideas as to what to do here? Do I need to add a special API here just to get the type annotations on superclasses and interfaces? |
Thanks for looking into this, Luke. I think I'll have to familiarize a little bit more with how these annotations work under the hood; sounds like I opened quite the can of worms there ;-) I hope I can come up with some suggestions in the next couple of days. |
OK, I fixed this... I added a method This will be in the next release. Thank you for the request, and sorry it took so long! |
Released in 4.8.142. Thank you! |
Thank you, Luke! This should solve my use case. Thanks for coming up with a solution so quickly! |
You're welcome! |
My use case requires me to collect classes that have a
TYPE_USE
annotation on an extended or implemented type (i.e., after theextends
orimplements
keyword).For example:
ClassGraph appears to be able to process
TYPE_USE
annotation in many other scenarios but not the case where the annotation marks an extended or implemented type.The text was updated successfully, but these errors were encountered: