Class WellKnownMutability

java.lang.Object
com.google.errorprone.bugpatterns.threadsafety.WellKnownMutability
All Implemented Interfaces:
ThreadSafety.KnownTypes

@Immutable public final class WellKnownMutability extends Object implements ThreadSafety.KnownTypes
A collection of types with known mutability.
  • Method Details

    • fromFlags

      public static WellKnownMutability fromFlags(ErrorProneFlags flags)
    • getKnownImmutableClasses

      public com.google.common.collect.ImmutableMap<String,AnnotationInfo> 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: ThreadSafety.KnownTypes
      Types that are known to be safe even if they're not annotated with an expected annotation.
      Specified by:
      getKnownSafeClasses in interface ThreadSafety.KnownTypes
    • getKnownMutableClasses

      public com.google.common.collect.ImmutableSet<String> getKnownMutableClasses()
    • getKnownUnsafeClasses

      @Deprecated public com.google.common.collect.ImmutableSet<String> getKnownUnsafeClasses()
      Deprecated.
      getKnownMutableClasses() is clearer if you're dealing with this specific class.
      Description copied from interface: ThreadSafety.KnownTypes
      Types that are known to be unsafe and don't need testing.
      Specified by:
      getKnownUnsafeClasses in interface ThreadSafety.KnownTypes
    • isProto2MessageClass

      public static boolean isProto2MessageClass(VisitorState state, com.sun.tools.javac.code.Type type)
      Compile-time equivalent of com.google.io.protocol.ProtocolSupport#isProto2MessageClass.
    • isProto2MutableMessageClass

      public static boolean isProto2MutableMessageClass(VisitorState state, com.sun.tools.javac.code.Type type)
      Compile-time equivalent of com.google.io.protocol.ProtocolSupport#isProto2MutableMessageClass.
    • isAnnotation

      public static boolean isAnnotation(VisitorState state, com.sun.tools.javac.code.Type type)
      Returns true if the type is an annotation.