@Immutable 注解的类中的任何非 final 字段。
这违反了 @Immutable 注解的约定。
示例:
import javax.annotation.concurrent.Immutable;
@Immutable
class Foo {
String bar = "foo";
}
支持的 @GuardedBy 注解为:
net.jcip.annotations.GuardedByjavax.annotation.concurrent.GuardedByorg.apache.http.annotation.GuardedBycom.android.annotations.concurrency.GuardedByandroidx.annotation.GuardedBycom.google.errorprone.annotations.concurrent.GuardedBy