Reputation: 113
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...
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Logger {
}
Upvotes: 2
Views: 1065
Reputation: 533442
Perhaps you intended to add the ElementType.TYPE
to the @Target
@Target({ElementType.METHOD, ElementType.TYPE})
Upvotes: 8