目前我正在研究Java8的新特性:http://www.oracle.com/technetwork/java/javase/8-whats-new-2157071.html
从上面的链接中可以清楚地看出:
Type Annotations provide the ability to apply an annotation anywhere a type is used, not just on a declaration. Used with a pluggable type system, this feature enables improved type checking of your code.
但是当我尝试在 Eclipse Neon 中添加诸如@NotNull
or之类的类型注释时@Readonly
,它根本无法识别这些注释!这太令人沮丧了。
我错过了什么?或者如果我需要做更多的配置,比如添加额外的 jar,为什么这仍然被列为 Java 8 的新特性?