Package org.unitils.inject.util
Enum Restore
- java.lang.Object
-
- java.lang.Enum<Restore>
-
- org.unitils.inject.util.Restore
-
- All Implemented Interfaces:
Serializable,Comparable<Restore>
public enum Restore extends Enum<Restore>
The type of accessing properties: by field or by setter. If default is chosen, the property access type is defined in the Unitils configuration file.- Author:
- Filip Neven, Tim Ducheyne
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULTOLD_VALUE, NO_RESTORE or NULL_VALUE as defined by the default value in the configuration.NO_RESTORELeave the injected fieldNULL_OR_0_VALUESet the injected field to the null or 0 valueOLD_VALUEReset the injected field back to its original value
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RestorevalueOf(String name)Returns the enum constant of this type with the specified name.static Restore[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final Restore DEFAULT
OLD_VALUE, NO_RESTORE or NULL_VALUE as defined by the default value in the configuration.
-
OLD_VALUE
public static final Restore OLD_VALUE
Reset the injected field back to its original value
-
NO_RESTORE
public static final Restore NO_RESTORE
Leave the injected field
-
NULL_OR_0_VALUE
public static final Restore NULL_OR_0_VALUE
Set the injected field to the null or 0 value
-
-
Method Detail
-
values
public static Restore[] 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 (Restore c : Restore.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Restore 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
-
-