de.danielbechler.diff
Enum Configuration.PrimitiveDefaultValueMode

java.lang.Object
  extended by java.lang.Enum<Configuration.PrimitiveDefaultValueMode>
      extended by de.danielbechler.diff.Configuration.PrimitiveDefaultValueMode
All Implemented Interfaces:
Serializable, Comparable<Configuration.PrimitiveDefaultValueMode>
Enclosing class:
Configuration

public static enum Configuration.PrimitiveDefaultValueMode
extends Enum<Configuration.PrimitiveDefaultValueMode>

Defines how default values of primitive types (int, long, short, byte, char, boolean, float, double) will be treated. A default value is either the one specified by the JDK (numbers are 0, booleans are false) or the value of the corresponding property when a new instance of its holding class gets created. In order to determine the proper default value, we'll attempt to instantiate the holding class once via its public constructor. If this instantiation fails (for example if there is no such constructor), we'll fall back to the JDK default. This configuration does not apply to the corresponding wrapper types (Integer, Long, Short, Byte, Character, Boolean, Float, Double).


Enum Constant Summary
ASSIGNED
          Default values of primitive types will be treated like any other value.
UNASSIGNED
          Default values of primitive types will be treated as if the property has not been set.
 
Method Summary
static Configuration.PrimitiveDefaultValueMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Configuration.PrimitiveDefaultValueMode[] 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

ASSIGNED

public static final Configuration.PrimitiveDefaultValueMode ASSIGNED
Default values of primitive types will be treated like any other value. Since there is no distinction, any change to a primitive value will be marked as Node.State#CHANGED.


UNASSIGNED

public static final Configuration.PrimitiveDefaultValueMode UNASSIGNED
Default values of primitive types will be treated as if the property has not been set. The consequence of this is that a change from default value to something else will be marked as Node.State#ADDED and from something else to the default value as Node.State#REMOVED.

Method Detail

values

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

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

valueOf

public static Configuration.PrimitiveDefaultValueMode 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 © 2012. All Rights Reserved.