Class WellKnownMutability
java.lang.Object
com.google.errorprone.bugpatterns.threadsafety.WellKnownMutability
- All Implemented Interfaces:
ThreadSafetyKnownTypes
A collection of types with known mutability.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ThreadSafetyKnownTypes
ThreadSafetyKnownTypes.MapBuilder -
Method Summary
Modifier and TypeMethodDescriptionstatic WellKnownMutabilityfromFlags(ErrorProneFlags flags) com.google.common.collect.ImmutableMap<String, AnnotationInfo> com.google.common.collect.ImmutableSet<String> com.google.common.collect.ImmutableMap<String, AnnotationInfo> Deprecated.com.google.common.collect.ImmutableSet<String> Deprecated.getKnownMutableClasses()is clearer if you're dealing with this specific class.static booleanisAnnotation(VisitorState state, com.sun.tools.javac.code.Type type) Returns true if the type is an annotation.static booleanisProto2MessageClass(VisitorState state, com.sun.tools.javac.code.Type type) Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MessageClass.static booleanisProto2MutableMessageClass(VisitorState state, com.sun.tools.javac.code.Type type) Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MutableMessageClass.static booleanisProtoEnum(VisitorState state, com.sun.tools.javac.code.Type type)
-
Method Details
-
fromFlags
-
getKnownImmutableClasses
-
getKnownSafeClasses
@Deprecated public com.google.common.collect.ImmutableMap<String, AnnotationInfo> getKnownSafeClasses()Deprecated.getKnownImmutableClasses()is clearer if you're dealing with this specific class.Description copied from interface:ThreadSafetyKnownTypesTypes that are known to be safe even if they're not annotated with an expected annotation.- Specified by:
getKnownSafeClassesin interfaceThreadSafetyKnownTypes
-
getKnownMutableClasses
-
getKnownUnsafeClasses
Deprecated.getKnownMutableClasses()is clearer if you're dealing with this specific class.Description copied from interface:ThreadSafetyKnownTypesTypes that are known to be unsafe and don't need testing.- Specified by:
getKnownUnsafeClassesin interfaceThreadSafetyKnownTypes
-
isProto2MessageClass
Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MessageClass. -
isProto2MutableMessageClass
public static boolean isProto2MutableMessageClass(VisitorState state, com.sun.tools.javac.code.Type type) Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MutableMessageClass. -
isProtoEnum
-
isAnnotation
Returns true if the type is an annotation.
-
getKnownImmutableClasses()is clearer if you're dealing with this specific class.