I can\'t figure out a use case for being able to annotate interfaces in Java.
Maybe someone could give me an example?
A use case that I am working with is javax/hibernate bean validation, we are using interfaces to help us on avoiding to define validations on every specific class.
public interface IUser {
@NotNull Long getUserId();
...
}
public class WebUser implements IUser {
private Long userId;
@Override
public Long getUserId(){
return userId;
}
...
}