title: How to create a custom annotation for both classes and methods?
body: <p>I have to create a custom Logged annotation that can be added to both classes and methods. This is what I've done so far but only works for methods...</p>
  
  <pre><code>@Target(ElementType.METHOD)
  @Retention(RetentionPolicy.RUNTIME)
  public @interface Logger {
  
  }
  </code></pre>