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

public Class AtomicBooleanConverter

extends BooleanConverter
implements Converter
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.converters.Converter, com.thoughtworks.xstream.converters.ConverterMatcher
Imports
java.util.concurrent.atomic.AtomicBoolean, com.thoughtworks.xstream.converters.Converter, .MarshallingContext, .UnmarshallingContext, com.thoughtworks.xstream.converters.basic.BooleanConverter, com.thoughtworks.xstream.io.HierarchicalStreamReader, .HierarchicalStreamWriter

Converts an AtomicBoolean type.
Author
Jörg Schaible

Field Summary

Inherited from com.thoughtworks.xstream.converters.basic.BooleanConverter:
BINARYTRUE_FALSEYES_NO

Constructor Summary

AccessConstructor and Description
public
AtomicBooleanConverter()

Constructs an AtomicBooleanConverter.

Method Summary

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

Overrides com.thoughtworks.xstream.converters.basic.BooleanConverter.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
)

Overrides com.thoughtworks.xstream.converters.basic.BooleanConverter.fromString.

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

Unmarshals an Object from its single value representation.
public void
marshal(final Object
The object to be marshalled.
source
,
final HierarchicalStreamWriter
A stream to write to.
writer
,
final MarshallingContext
A context that allows nested objects to be processed by XStream.
context
)

Implements com.thoughtworks.xstream.converters.Converter.marshal.

Convert an object to textual data.
public String
toString(final Object
the Object to be converted
obj
)

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

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

Marshals an Object into a single value representation.
public Object
unmarshal(final HierarchicalStreamReader
The stream to read the text from.
reader
,
final UnmarshallingContext context)

Implements com.thoughtworks.xstream.converters.Converter.unmarshal.

Convert textual data back into an object.
Inherited from com.thoughtworks.xstream.converters.basic.BooleanConverter:
shouldConvert

Constructor Detail

AtomicBooleanConverterback to summary
public AtomicBooleanConverter()

Constructs an AtomicBooleanConverter. Initializes the converter with true and false as string representation.

Method Detail

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

Overrides com.thoughtworks.xstream.converters.basic.BooleanConverter.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)

Overrides com.thoughtworks.xstream.converters.basic.BooleanConverter.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

marshalback to summary
public void marshal(final Object source, final HierarchicalStreamWriter writer, final MarshallingContext context)

Implements com.thoughtworks.xstream.converters.Converter.marshal.

Doc from com.thoughtworks.xstream.converters.Converter.marshal.

Convert an object to textual data.

Parameters
source:Object

The object to be marshalled.

writer:HierarchicalStreamWriter

A stream to write to.

context:MarshallingContext

A context that allows nested objects to be processed by XStream.

toStringback to summary
public String toString(final Object obj)

Overrides com.thoughtworks.xstream.converters.basic.BooleanConverter.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

unmarshalback to summary
public Object unmarshal(final HierarchicalStreamReader reader, final UnmarshallingContext context)

Implements com.thoughtworks.xstream.converters.Converter.unmarshal.

Doc from com.thoughtworks.xstream.converters.Converter.unmarshal.

Convert textual data back into an object.

Parameters
reader:HierarchicalStreamReader

The stream to read the text from.

Returns:Object

The resulting object.