Package com.diffblue.cover.annotations
Enum MockDecision
- java.lang.Object
-
- java.lang.Enum<MockDecision>
-
- com.diffblue.cover.annotations.MockDecision
-
- All Implemented Interfaces:
Serializable,Comparable<MockDecision>
public enum MockDecision extends Enum<MockDecision>
A decision indicating that a particular annotation indicating that mocking should be required vs recommended vs allowed vs forbidden from mocking.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOWEDNo preference with regard to mocking, instantations may be mocked or not.FORBIDDENMocking is forbidden; instantiation must be done without mocking.RECOMMENDEDMocking is recommended and should be used in preference to instantiation, but instantiations are still permitted.REQUIREDMocking is required, other instantiations are not permitted.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MockDecisionvalueOf(String name)Returns the enum constant of this type with the specified name.static MockDecision[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
REQUIRED
public static final MockDecision REQUIRED
Mocking is required, other instantiations are not permitted.
-
RECOMMENDED
public static final MockDecision RECOMMENDED
Mocking is recommended and should be used in preference to instantiation, but instantiations are still permitted.
-
ALLOWED
public static final MockDecision ALLOWED
No preference with regard to mocking, instantations may be mocked or not.
-
FORBIDDEN
public static final MockDecision FORBIDDEN
Mocking is forbidden; instantiation must be done without mocking.
-
-
Method Detail
-
values
public static MockDecision[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MockDecision c : MockDecision.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MockDecision valueOf(String name)
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
-
-