Top Description Fields Constructors Methods
com.thoughtworks.xstream.converters.extended

public Class ISO8601GregorianCalendarConverter

extends AbstractSingleValueConverter
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException, java.util.GregorianCalendar, com.thoughtworks.xstream.converters.SingleValueConverter, com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter, com.thoughtworks.xstream.core.JVM

A GregorianCalendarConverter conforming to the ISO8601 standard. The converter will always serialize the calendar value in UTC and deserialize it to a value in the current default time zone.
Authors
Mauro Talevi, Jörg Schaible
Since
1.1.3
See Also
ISO 8601

Field Summary

Modifier and TypeField and Description
private final SingleValueConverter
private static final Class<T>[]
private static final Object[]

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
canConvert(final Class<T>
the Class representing the object type to be converted
type
)

Implements abstract com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter.canConvert.

Implements com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Determines whether the converter can marshall a particular type.
public Object
fromString(final String
the String with the single value of the Object
str
)

Implements abstract com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter.fromString.

Implements com.thoughtworks.xstream.converters.SingleValueConverter.fromString.

Unmarshals an Object from its single value representation.
public String
toString(final Object
the Object to be converted
obj
)

Overrides com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter.toString.

Implements com.thoughtworks.xstream.converters.SingleValueConverter.toString.

Marshals an Object into a single value representation.

Field Detail

converterback to summary
private final SingleValueConverter converter
EMPTY_CLASS_ARRAYback to summary
private static final Class<T>[] EMPTY_CLASS_ARRAY
EMPTY_OBJECT_ARRAYback to summary
private static final Object[] EMPTY_OBJECT_ARRAY

Constructor Detail

ISO8601GregorianCalendarConverterback to summary
public ISO8601GregorianCalendarConverter()

Method Detail

canConvertback to summary
public boolean canConvert(final Class<T> type)

Implements abstract com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter.canConvert.

Implements com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Doc from com.thoughtworks.xstream.converters.ConverterMatcher.canConvert.

Determines whether the converter can marshall a particular type.

Parameters
type:Class<T>

the Class representing the object type to be converted

fromStringback to summary
public Object fromString(final String str)

Implements abstract com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter.fromString.

Implements com.thoughtworks.xstream.converters.SingleValueConverter.fromString.

Doc from com.thoughtworks.xstream.converters.SingleValueConverter.fromString.

Unmarshals an Object from its single value representation.

Parameters
str:String

the String with the single value of the Object

Returns:Object

the Object

toStringback to summary
public String toString(final Object obj)

Overrides com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter.toString.

Implements com.thoughtworks.xstream.converters.SingleValueConverter.toString.

Doc from com.thoughtworks.xstream.converters.SingleValueConverter.toString.

Marshals an Object into a single value representation.

Parameters
obj:Object

the Object to be converted

Returns:String

a String with the single value of the Object or null