public abstract class ValueSuppressionStrategy extends Object
Modifier and Type | Field and Description |
---|---|
static ValueSuppressionStrategy |
ALLOW_ALL_VALUES
Strategy allows all values to be expressed for all attributes
|
static ValueSuppressionStrategy |
DEFAULT
Default strategy is
SUPPRESS_EMPTY . |
static ValueSuppressionStrategy |
SUPPRESS_EMPTY
Suppresses all null values.
|
Constructor and Description |
---|
ValueSuppressionStrategy() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
suppressAttribute(AttributeDescriptor attributeDescriptor,
String value)
Should the given attribute value be suppressed?
|
boolean |
suppressElement(ElementDescriptor element,
String namespaceUri,
String localName,
String qualifiedName,
Object value)
Should be given element value be suppressed?
|
public static final ValueSuppressionStrategy ALLOW_ALL_VALUES
public static final ValueSuppressionStrategy SUPPRESS_EMPTY
public static final ValueSuppressionStrategy DEFAULT
SUPPRESS_EMPTY
.public abstract boolean suppressAttribute(AttributeDescriptor attributeDescriptor, String value)
attributeDescriptor
- AttributeDescriptor
describing the attribute, not nullvalue
- Object
value, possibly nullpublic boolean suppressElement(ElementDescriptor element, String namespaceUri, String localName, String qualifiedName, Object value)
Should be given element value be suppressed?
Note: to preserve binary compatibility, this method contains an implementation that returns false. Subclasses should not rely upon this behaviour as (in future) this may be made abstract.
element
- ElementDescriptor
describing the element, not nullnamespaceUri
- the namespace of the element to be writtenlocalName
- the local name of the element to be writtenqualifiedName
- the qualified name of the element to be writtenvalue
- Object
value, possibly nullCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.