org.unitils.inject.util
Enum PropertyAccess

java.lang.Object
  extended by java.lang.Enum<PropertyAccess>
      extended by org.unitils.inject.util.PropertyAccess
All Implemented Interfaces:
Serializable, Comparable<PropertyAccess>

public enum PropertyAccess
extends Enum<PropertyAccess>

The type of accessing properties: by field or by setter. If default is chosen, the property access is defined in the Unitils configuration file.

Author:
Filip Neven, Tim Ducheyne

Enum Constant Summary
DEFAULT
          Field or setter injection, defined by the configured default value
FIELD
          Field injection
SETTER
          Setter injection
 
Method Summary
static PropertyAccess valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PropertyAccess[] 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

FIELD

public static final PropertyAccess FIELD
Field injection


SETTER

public static final PropertyAccess SETTER
Setter injection


DEFAULT

public static final PropertyAccess DEFAULT
Field or setter injection, defined by the configured default value

Method Detail

values

public static PropertyAccess[] 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 (PropertyAccess c : PropertyAccess.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PropertyAccess 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.