public abstract class EnumConstruct extends ValueConstruct
ValueConstruct
where the attribute values are constrained to a discrete set of valid
values.AbstractExtension.AttributesHandler
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
values
The set of valid values for the enum construct.
|
attrName
localName, namespace
Modifier | Constructor and Description |
---|---|
protected |
EnumConstruct(XmlNamespace namespace,
java.lang.String tagName,
java.lang.String attrName,
java.util.Set<java.lang.String> values)
Constructs a new EnumConstruct instance associated with a particular
XML representation and set of expected values.
|
protected |
EnumConstruct(XmlNamespace namespace,
java.lang.String tagName,
java.lang.String attrName,
java.util.Set<java.lang.String> values,
java.lang.String initialValue)
Constructs a new EnumConstruct instance associated with a particular
XML representation and set of expected values.
|
Modifier and Type | Method and Description |
---|---|
void |
setValue(java.lang.String v)
Sets the value.
|
consumeAttributes, equals, generate, getHandler, getValue, hashCode, hasValue, isRequired, putAttributes, setRequired
disableStrictValidation, enableStrictValidation, eq, generate, generateAttributes, getExtensionLocalName, getExtensionNamespace, isImmutable, isStrictValidation, sameClassAs, setImmutable, throwExceptionForMissingAttribute, throwExceptionIfImmutable, validate
protected java.util.Set<java.lang.String> values
protected EnumConstruct(XmlNamespace namespace, java.lang.String tagName, java.lang.String attrName, java.util.Set<java.lang.String> values)
protected EnumConstruct(XmlNamespace namespace, java.lang.String tagName, java.lang.String attrName, java.util.Set<java.lang.String> values, java.lang.String initialValue)
null
, the constructed instance will
be initialized to the value and will be immutable.public void setValue(java.lang.String v) throws java.lang.IllegalArgumentException
ValueConstruct
setValue
in class ValueConstruct
v
- new value for the value construct or null
to reset.java.lang.IllegalArgumentException
- if the value is invalid for the construct.