@Retention(value=RUNTIME) @Target(value={PACKAGE,FIELD,METHOD,TYPE,PARAMETER}) public @interface XmlTypeValidator
XmlAdapter
for field
validation but is NOT recognized by JAXB during marshaling and unmarshaling.
Usage: The @XmlTypeValidator annotation can be used with the following program elements:
XmlTypeValidators
When @XmlTypeValidator annotation is defined on a class, it applies
to all references to the class.
When @XmlTypeValidator annotation is defined at the package level it
applies to all references from within the package to
@XmlTypeValidator.type().
When @XmlTypeValidator annotation is defined on the field, property
or parameter, then the annotation applies to the field, property or the
parameter only.
A @XmlTypeValidator annotation on a field, property or parameter
overrides the @XmlTypeValidator annotation associated with the class
being referenced by the field, property or parameter.
A @XmlTypeValidator annotation on a class overrides the
@XmlTypeValidator annotation specified at the package level for that
class.
This is annotation can be used with any other valid annotation. e.g. XmlElement
, XmlAttribute
, XmlElementRef
,
XmlElementRefs
, XmlAnyElement
. This can also be used at the
package level with other valid annotations such as XmlAccessorType
, XmlSchema
, XmlSchemaType
,
XmlSchemaTypes
.
Example:
@XmlTypeValidator(type = TCalendar.class, value = XmlAdapterDATE.class)
XmlAdapter
Modifier and Type | Required Element and Description |
---|---|
Class<? extends XmlAdapter> |
value
Points to the class that converts a value type to a bound type or vice
versa.
|
public abstract Class<? extends XmlAdapter> value
XmlAdapter
for more details.public abstract Class<?> type
Copyright © 2016 OpenSSRF.org. All rights reserved.