标注通常用来指示代码的元信息。
Annotations are often used to indicate metainformation about code.
如果这样做,那么您的代码就会突然之间有80%是泛型、标注和枚举。
Do that and suddenly your code is 80 percent generics, annotations, and enumerations.
通过标注指定这个约束条件意味着我的代码不再会被重复的条件弄得乱七八糟,这些条件检查 null 值,并且一旦找到该值就会抛出异常。
Specifying this constraint through annotations means I no longer need to litter my code with repetitive conditionals that check for null and throw an exception on finding it.
应用推荐