Suppose the following. There is some superclass or interface declaring some method: Base.doSmth(). There is also some inherited class implementing this method: Inherited.doSmth(). We have reflection (Method) of the Inherited.doSmth() and we know what is the base class so that we can access its reflection (Base.class). The question is: how to get the reflection on Base.doSmth() method? Of course, we can iterate through all methods of Base and find one by name, parameters and return types, but maybe there is some solution already. Everything happens in Spring-related class, so code is already coupled to Spring, thus using its utilities is ok.
Thanks.
You can use
public native Class<? super T> getSuperclass();for access to super class meta data and then usingpublic Method[] getMethods() throws SecurityExceptionfor access to its methods meta data.