|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.betwixt.strategy.ValueSuppressionStrategy
public abstract class ValueSuppressionStrategy
Determines whether the expression of an attribute with a values should be suppressed.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
ValueSuppressionStrategy()
|
|
| Method Summary | |
|---|---|
abstract boolean |
suppressAttribute(AttributeDescriptor attributeDescriptor,
java.lang.String value)
Should the given attribute value be suppressed? |
boolean |
suppressElement(ElementDescriptor element,
java.lang.String namespaceUri,
java.lang.String localName,
java.lang.String qualifiedName,
java.lang.Object value)
Should be given element value be suppressed? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ValueSuppressionStrategy ALLOW_ALL_VALUES
public static final ValueSuppressionStrategy SUPPRESS_EMPTY
public static final ValueSuppressionStrategy DEFAULT
SUPPRESS_EMPTY.
| Constructor Detail |
|---|
public ValueSuppressionStrategy()
| Method Detail |
|---|
public abstract boolean suppressAttribute(AttributeDescriptor attributeDescriptor,
java.lang.String value)
attributeDescriptor - AttributeDescriptor describing the attribute, not nullvalue - Object value, possibly null
public boolean suppressElement(ElementDescriptor element,
java.lang.String namespaceUri,
java.lang.String localName,
java.lang.String qualifiedName,
java.lang.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 null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||