Package org.refcodes.mixin
Enum VerifyMode
- java.lang.Object
-
- java.lang.Enum<VerifyMode>
-
- org.refcodes.mixin.VerifyMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<VerifyMode>
public enum VerifyMode extends java.lang.Enum<VerifyMode>
The verify-mode determines (when supported) whether an algorithm verifies its result before proceeding. In case verification fails, either the problem is just reportedREPORT_ONLY
e.g. logged or an exception (such as the VerifyRuntimeException found in the refcodes-exception artifact) is thrown (THROW_EXCEPTION
).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NONE
Verification is disabled.REPORT_ONLY
Verification is enabled, problems are only reported.THROW_EXCEPTION
Verification is enabled, problems cause an exception.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isVerify()
Checks if is verify.static VerifyMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static VerifyMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final VerifyMode NONE
Verification is disabled.
-
REPORT_ONLY
public static final VerifyMode REPORT_ONLY
Verification is enabled, problems are only reported.
-
THROW_EXCEPTION
public static final VerifyMode THROW_EXCEPTION
Verification is enabled, problems cause an exception. You may use the VerifyRuntimeException found in the refcodes-exception artifact.
-
-
Method Detail
-
values
public static VerifyMode[] 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 (VerifyMode c : VerifyMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static VerifyMode valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isVerify
public boolean isVerify()
Checks if is verify.- Returns:
- true, if is verify
-
-