javax.xml.bind
Interface DatatypeConverterInterface

public interface DatatypeConverterInterface

The DatatypeConverterInterface is for JAXB provider use only. A
JAXB provider must supply a class that implements this interface.
JAXB Providers are required to call the
DatatypeConverter.setDatatypeConverter api at
some point before the first marshal or unmarshal operation (perhaps during
the call to JAXBContext.newInstance). This step is necessary to configure
the converter that should be used to perform the print and parse
functionality. Calling this api repeatedly will have no effect - the
DatatypeConverter instance passed into the first invocation is the one that
will be used from then on.

This interface defines the parse and print methods. There is one
parse and print method for each XML schema datatype specified in the
the default binding Table 5-1 in the JAXB specification.

The parse and print methods defined here are invoked by the static parse
and print methods defined in the DatatypeConverter
class.

A parse method for a XML schema datatype must be capable of converting any
lexical representation of the XML schema datatype ( specified by the
XML Schema Part2: Datatypes
specification into a value in the value space of the XML schema datatype.
If an error is encountered during conversion, then an IllegalArgumentException
or a subclass of IllegalArgumentException must be thrown by the method.

A print method for a XML schema datatype can output any lexical
representation that is valid with respect to the XML schema datatype.
If an error is encountered during conversion, then an IllegalArgumentException,
or a subclass of IllegalArgumentException must be thrown by the method.