Enum Class ThreadSafety.Purpose
java.lang.Object
java.lang.Enum<ThreadSafety.Purpose>
com.google.errorprone.bugpatterns.threadsafety.ThreadSafety.Purpose
- All Implemented Interfaces:
Serializable, Comparable<ThreadSafety.Purpose>, Constable
- Enclosing class:
ThreadSafety
The
ThreadSafety
utility class can be used by either the bug checker that enforces
immutability or by the bug checker that enforces thread-safety. Depending on which of these bug
checkers is using this utility, different messages become appropriate.-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThis is being used by the immutability bug checkerThis is being used by the thread-safety bug checker -
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadSafety.Purpose
Returns the enum constant of this class with the specified name.static ThreadSafety.Purpose[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FOR_IMMUTABLE_CHECKER
This is being used by the immutability bug checker -
FOR_THREAD_SAFE_CHECKER
This is being used by the thread-safety bug checker
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-