... 标记注释(marker annotation) 单成员注释(single-member annotation) 记住,无论何时使用一个单成员注释,该成员的名字必须是value。 ...
基于1个网页-相关网页
Note that this annotation type doesn't have a single-member variable, so you gain nothing by naming one of the variables value.
因为该注释类型的成员变量不是一个,所以将一个变量命名为value没有任何意义。
Take note, though — the shorthand version is available only if the annotation type has a single-member variable named value.
不过要注意,只有当注释类型只有一个成员变量,而且变量名为value时,才能使用简写形式。
应用推荐