I’m not sure this is possible but I’m trying to declare an Object that will act as a Class, Method or Field (mainly just to call getAnnotation()).
I thought of trying Object<? extends AnnotatedElement> as they all share that implementation but Object is not a generic type.
Is this possible and if not what would be a better approach (besides separate objects for each)?
I’m not sure this is possible but I’m trying to declare an Object that
Share
Just declare as AnnotatedElement.