public class DateTimeTranslator extends IllegalArgumentExceptionSimpleValueTranslator<java.util.Calendar>
Calendar
} and xsd:dateTime.MAX_STRING_REPRESENTATION_LENGTH
Constructor and Description |
---|
DateTimeTranslator() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<java.util.Calendar> |
getObjectClass()
Returns the Java class of object instances created by this translator.
|
java.lang.String |
javaToRepresentation(java.lang.Object object,
WriterStreamDataProvider<?> streamDataProvider)
Converts the object by invoking its
Object.toString() method. |
protected java.util.Calendar |
parseValue(java.lang.String representation,
ReaderStreamDataProvider<?> streamDataProvider) |
representationToJava
hasStringRepresentation, readXMLRepresentation, writeXMLRepresentation
equals, hashCode
public DateTimeTranslator()
public java.lang.Class<java.util.Calendar> getObjectClass()
ObjectTranslator
Note that ObjectTranslator.javaToRepresentation(Object, WriterStreamDataProvider)
and ObjectTranslator.writeXMLRepresentation(XMLStreamWriter, Object, WriterStreamDataProvider)
may also
accept instances of other classes. This is independent from the return value here.
protected java.util.Calendar parseValue(java.lang.String representation, ReaderStreamDataProvider<?> streamDataProvider) throws java.lang.IllegalArgumentException
parseValue
in class IllegalArgumentExceptionSimpleValueTranslator<java.util.Calendar>
java.lang.IllegalArgumentException
public java.lang.String javaToRepresentation(java.lang.Object object, WriterStreamDataProvider<?> streamDataProvider) throws java.lang.UnsupportedOperationException, java.lang.ClassCastException
SimpleValueTranslator
Object.toString()
method.javaToRepresentation
in interface ObjectTranslator<java.util.Calendar>
javaToRepresentation
in class SimpleValueTranslator<java.util.Calendar>
object
- the object to be convertedstreamDataProvider
- TODOjava.lang.UnsupportedOperationException
- if objects handled by this instance can only be represented as XMLjava.lang.ClassCastException
- if the specified object is not an instance of the supported class or does not implement the supported
interfaceObjectTranslator.javaToRepresentation(java.lang.Object, WriterStreamDataProvider)