I want to access Method via reflection. The problem is that the Method is annotated in an interface:

```
public interface MyRepository extends CrudRepository<MyClass, Long> {

    @CustomAnnotation
    MyClass findByName(String name);
}

```

As you see I use Spring which provides a class that will implement this Repository interface.
I want to create a method, that will get a Repository and invoke all methods that are annotated with `@CustomAnnotation`. 

```
public void do(Repository<?, ?> repository){
   Method[] methods=repository.getClass().getMethodThatAreAnnotatedInInterfaceWith(CustomAnnotation.class);
   ....
}

```

Because the implementation of an interface won’t have the annotations of the interface present, I do not know how to query these methods.