org.unitils.inject.util
Enum Restore

java.lang.Object
  extended by java.lang.Enum<Restore>
      extended by 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
DEFAULT
          OLD_VALUE, NO_RESTORE or NULL_VALUE as defined by the default value in the configuration.
NO_RESTORE
          Leave the injected field
NULL_OR_0_VALUE
          Set the injected field to the null or 0 value
OLD_VALUE
          Reset the injected field back to its original value
 
Method Summary
static Restore valueOf(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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

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 name
NullPointerException - if the argument is null


Copyright © 2011. All Rights Reserved.