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 com.google.errorprone.bugpatterns.threadsafety.ThreadSafetyKnownTypes
ThreadSafetyKnownTypes.MapBuilder
-
Method Summary
Modifier and TypeMethodDescriptionstatic WellKnownMutability
fromFlags
(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 boolean
isAnnotation
(VisitorState state, com.sun.tools.javac.code.Type type) Returns true if the type is an annotation.static boolean
isProto2MessageClass
(VisitorState state, com.sun.tools.javac.code.Type type) Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MessageClass
.static boolean
isProto2MutableMessageClass
(VisitorState state, com.sun.tools.javac.code.Type type) Compile-time equivalent ofcom.google.io.protocol.ProtocolSupport#isProto2MutableMessageClass
.static boolean
isProtoEnum
(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:ThreadSafetyKnownTypes
Types that are known to be safe even if they're not annotated with an expected annotation.- Specified by:
getKnownSafeClasses
in interfaceThreadSafetyKnownTypes
-
getKnownMutableClasses
-
getKnownUnsafeClasses
Deprecated.getKnownMutableClasses()
is clearer if you're dealing with this specific class.Description copied from interface:ThreadSafetyKnownTypes
Types that are known to be unsafe and don't need testing.- Specified by:
getKnownUnsafeClasses
in 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.