Class AbstractAttributedCharacterIteratorAttributeConverter
- java.lang.Object
-
- com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
-
- com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter
-
- All Implemented Interfaces:
ConverterMatcher,SingleValueConverter
- Direct Known Subclasses:
TextAttributeConverter
public class AbstractAttributedCharacterIteratorAttributeConverter extends AbstractSingleValueConverter
An abstract converter implementation for constants ofAttributedCharacterIterator.Attributeand derived types.- Since:
- 1.2.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAbstractAttributedCharacterIteratorAttributeConverter.Reflections
-
Field Summary
Fields Modifier and Type Field Description private static java.util.MapinstanceMapsprivate java.lang.Classtype
-
Constructor Summary
Constructors Constructor Description AbstractAttributedCharacterIteratorAttributeConverter(java.lang.Class type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.MapbuildAttributeMap()booleancanConvert(java.lang.Class type)Determines whether the converter can marshall a particular type.java.lang.ObjectfromString(java.lang.String str)Unmarshals an Object from its single value representation.private java.util.MapgetAttributeMap()private java.lang.StringgetName(java.text.AttributedCharacterIterator.Attribute attribute)java.lang.StringtoString(java.lang.Object source)Marshals an Object into a single value representation.
-
-
-
Method Detail
-
canConvert
public boolean canConvert(java.lang.Class type)
Description copied from interface:ConverterMatcherDetermines whether the converter can marshall a particular type.- Specified by:
canConvertin interfaceConverterMatcher- Specified by:
canConvertin classAbstractSingleValueConverter- Parameters:
type- the Class representing the object type to be converted
-
toString
public java.lang.String toString(java.lang.Object source)
Description copied from interface:SingleValueConverterMarshals an Object into a single value representation.- Specified by:
toStringin interfaceSingleValueConverter- Overrides:
toStringin classAbstractSingleValueConverter- Parameters:
source- the Object to be converted- Returns:
- a String with the single value of the Object or
null
-
getName
private java.lang.String getName(java.text.AttributedCharacterIterator.Attribute attribute)
-
fromString
public java.lang.Object fromString(java.lang.String str)
Description copied from interface:SingleValueConverterUnmarshals an Object from its single value representation.- Specified by:
fromStringin interfaceSingleValueConverter- Specified by:
fromStringin classAbstractSingleValueConverter- Parameters:
str- the String with the single value of the Object- Returns:
- the Object
-
getAttributeMap
private java.util.Map getAttributeMap()
-
buildAttributeMap
private java.util.Map buildAttributeMap()
-
-