Should I make a constants class for my annotations?

Which is better? 1. `@SuppressWarnings("unchecked")` 2. `@SuppressWarnings(AnnotationConstants.UNCHECKED)` Where `AnnotationConstants` is a typical constants class... public final class AnnotationConstants { private AnnotationConstants() { } public static final String UNCHECKED = "unchecked"; ... } I know that there are a lot of general arguments for and against constants classes--and that's exactly what I'm **not** interested in. I want to know if a constants class **specifically** for annotations is a good idea or a bad idea.

以上就是Should I make a constants class for my annotations?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准