title: How to intercept meta annotations (annotated annotations) in Spring AOP
body: <p>Suppose I want to find all classes annotated with @Controller, I would create this pointcut:</p>
  
  <pre><code>    @Pointcut("within(@org.springframework.stereotype.Controller *)")
      public void controllerPointcut() {}
  </code></pre>
  
  <p>But those controllers annotated with @RestController can not be found.
  Since RestController itself is annoatated with @Controller.</p>
  
  <p>Any idea on how to find classes annotated either with @Controller or @RestController without having to create two Pointcuts ?</p>
  
  <hr>
  
  <p>===== edit ====
  My real intention here is as follows:</p>
  
  <p>parent annotation:</p>
  
  <pre><code>public @interface ParentAnnotation {}
  </code></pre>
  
  <p>child annotation (annotated with @ParentAnnotation):</p>
  
  <pre><code>@ParentAnnotation 
  public @interface ChildAnnotation {}
  </code></pre>
  
  <p>class A:</p>
  
  <pre><code>@ParentAnnotation 
  public class MyClassA {}
  </code></pre>
  
  <p>class B:</p>
  
  <pre><code>@ChildAnnotation 
  public class MyClassB {}
  </code></pre>
  
  <p>Now I want to find both MyClassA and MyClassB through @ParentAnnotation.
  There's no question for finding MyClassA, but MyClassB is indirectly annotated with @ParentAnnotation, is there a generic way to deal such situation?</p>