Enum UnusedReturnValueMatcher.AllowReason
java.lang.Object
java.lang.Enum<UnusedReturnValueMatcher.AllowReason>
com.google.errorprone.matchers.UnusedReturnValueMatcher.AllowReason
- All Implemented Interfaces:
Serializable
,Comparable<UnusedReturnValueMatcher.AllowReason>
,java.lang.constant.Constable
- Enclosing class:
UnusedReturnValueMatcher
public static enum UnusedReturnValueMatcher.AllowReason
extends Enum<UnusedReturnValueMatcher.AllowReason>
Enumeration of known reasons that an unused return value may be allowed because of the context
in which the method is used. Suppression is not considered here; these are reasons that don't
have anything to do with specific checkers.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe context is one in which the method is probably being called to test for an exception it throws.The method is a known Builder setter method (that always returns "this").The context is a mocking call such as inverify(foo).getBar();
.The method returnsjava.lang.Void
at this use-site. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this type with the specified name.static UnusedReturnValueMatcher.AllowReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
EXCEPTION_TESTING
The context is one in which the method is probably being called to test for an exception it throws. -
MOCKING_CALL
The context is a mocking call such as inverify(foo).getBar();
. -
RETURNS_JAVA_LANG_VOID
The method returnsjava.lang.Void
at this use-site. -
KNOWN_BUILDER_SETTER
The method is a known Builder setter method (that always returns "this").
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-