org.schwa.dr
Enum FieldMode

java.lang.Object
  extended by java.lang.Enum<FieldMode>
      extended by org.schwa.dr.FieldMode
All Implemented Interfaces:
Serializable, Comparable<FieldMode>

public enum FieldMode
extends Enum<FieldMode>

A enum defining the types of modes that an Ann field can have.

Author:
Tim Dawborn

Enum Constant Summary
DELETE
          DELETE states that this field will not be written out during serialisation.
READ_ONLY
          Fields which are set to be READ_ONLY will have their serialised form cached with the annotation instance as well as being deserialised onto the object.
READ_WRITE
          READ_WRITE is the default value for all docrep fields.
 
Method Summary
static FieldMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FieldMode[] 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

READ_WRITE

public static final FieldMode READ_WRITE
READ_WRITE is the default value for all docrep fields. Fields of this type do not have any laziness.


READ_ONLY

public static final FieldMode READ_ONLY
Fields which are set to be READ_ONLY will have their serialised form cached with the annotation instance as well as being deserialised onto the object. The original serialised form will be written back out when the instance is serialised.


DELETE

public static final FieldMode DELETE
DELETE states that this field will not be written out during serialisation.

Method Detail

values

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

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

valueOf

public static FieldMode 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 © 2014. All rights reserved.