Skip navigation links
org.eclipse.persistence.oxm.mappings.nullpolicy
Enum XMLNullRepresentationType
java.lang.Object
java.lang.Enum<XMLNullRepresentationType>
org.eclipse.persistence.oxm.mappings.nullpolicy.XMLNullRepresentationType
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<XMLNullRepresentationType>
-
public enum XMLNullRepresentationType
- extends java.lang.Enum<XMLNullRepresentationType>
Description: An enum that is used within a Node Null Policy to determine what to marshal for a null node.
We define 3 final instances available to the user (XSI_NIL, ABSENT_NODE(default) and EMPTY_NODE.
Flag |
Description |
XSI_NIL |
Nillable: Write out an xsi:nil="true" attribute. |
ABSENT_NODE(default) |
Optional: Write out no node. |
EMPTY_NODE |
Required: Write out an empty <node/> or node="" node. |
- See Also:
AbstractNullPolicy
Enum Constant Summary |
ABSENT_NODE
Do not write out anything (default optional policy behavior). |
EMPTY_NODE
Write out an empty node. |
XSI_NIL
Write out an xsi:nil="true" attribute. |
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 |
XSI_NIL
public static final XMLNullRepresentationType XSI_NIL
- Write out an xsi:nil="true" attribute. Nillable policy behavior.
ABSENT_NODE
public static final XMLNullRepresentationType ABSENT_NODE
- Do not write out anything (default optional policy behavior).
EMPTY_NODE
public static final XMLNullRepresentationType EMPTY_NODE
- Write out an empty node. Required policy behavior
values
public static XMLNullRepresentationType[] 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 (XMLNullRepresentationType c : XMLNullRepresentationType.values())
System.out.println(c);
-
- Returns:
- an array containing the constants of this enum type, in the order they are declared
valueOf
public static XMLNullRepresentationType valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified name
java.lang.NullPointerException
- if the argument is null
Skip navigation links