|
I personally agree. In fact my preference is the other way... have Jandex expose this more comprehensive type model and us use that. I have spoken with Jason about it and he agrees in principal that Jandex (or a similar library) should handle this. He agrees in principal. The problem is that this is likely just not a priority for him.
One thing we could do is to fork Jandex and do this work ourselves and then push him a PR for consideration. The downside here is that we'd not be able to use and WildFly-supplied Jandex indexes until we match up.
So in the interim I think what I did is actually the best. Hardy, is it just a matter of the names? There are some things we could do to alleviate that:
-
Convert Map<DotName,AnnotationInstance> returns associated with reflite objects as Map<Name,AnnotationInstance> instead
-
Expose a JavaTypeRepository#getAnnotations(Name) method that delegates to IndexView#getAnnotations(DotName)
|