Enum XMLNullRepresentationType
- java.lang.Object
-
- java.lang.Enum<XMLNullRepresentationType>
-
- org.eclipse.persistence.oxm.mappings.nullpolicy.XMLNullRepresentationType
-
- All Implemented Interfaces:
Serializable
,Comparable<XMLNullRepresentationType>
public enum XMLNullRepresentationType extends 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.Node Null Policy 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
Enum Constants Enum Constant Description 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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static XMLNullRepresentationType
valueOf(String name)
Returns the enum constant of this type with the specified name.static XMLNullRepresentationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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
-
-
Method Detail
-
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(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 nameNullPointerException
- if the argument is null
-
-