哪个更好?
@SuppressWarnings("unchecked")
@SuppressWarnings(AnnotationConstants.UNCHECKED)
AnnotationConstants
典型的常量类在哪里...
public final class AnnotationConstants {
private AnnotationConstants() { }
public static final String UNCHECKED = "unchecked";
...
}
我知道有很多支持和反对常量类的一般论点——而这正是我不感兴趣的。我想知道专门用于注释的常量类是个好主意还是坏主意。