Package com.attivio.util.serialization
Class AbstractConverter
- java.lang.Object
-
- com.attivio.util.serialization.AbstractConverter
-
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.Converter,com.thoughtworks.xstream.converters.ConverterMatcher
- Direct Known Subclasses:
AbstractPhraseConverter,AbstractPlatformMessageConverter,AbstractQueryConverter,AdminQueryConverter,AttivioAclConverter,AttivioExceptionConverter,AttivioGroupMembershipConverter,AttivioIOExceptionConverter,AttivioPrincipalConverter,AttivioPrincipalKeyConverter,AttivioRemoteExceptionConverter,AttivioRuntimeExceptionConverter,ByteArrayContentPointerConverter,CircleConverter,ContentPointerConverter,DictionaryEntryConverter,DictionaryInfoConverter,DOMConverter,EllipseConverter,ErrorCodeConverter,FacetBucketConverter,FacetFilterConverter,FacetRangeConverter,FacetRequestConverter,FacetResponseConverter,FieldCollapseConverter,FieldExpressionConverter,GroupedMessageIdConverter,IngestDocumentConverter,MessageHistoryConverter,MessageIdConverter,MessageMetadataConverter,PointConverter,PolygonConverter,ProcessingResultConverter,ProcessingResultMessageConverter,PropertyMapConverter,QueryFeedbackConverter,QueryPlacementConverter,RectangleConverter,RelevancyModelConverter,SearchDocumentConverter,SearchDocumentListConverter,SortConverter,StreamRequestInfoConverter,TokenConverter,WorkflowQueueConverter
public abstract class AbstractConverter extends java.lang.Object implements com.thoughtworks.xstream.converters.ConverterOur abstract converter. Has statics for basic array type conversion.
-
-
Constructor Summary
Constructors Constructor Description AbstractConverter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, int value)Add an integer attribute to the current node.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, int[] value)Add a int[] attribute to the current node as a string of comma separated integers.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, int[] value, int count)Add a int[] attribute to the current node as a string of comma separated integers.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, long value)Add a long attribute to the current node.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Boolean value)Add the string representation of a value as an attribute to the current node.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Class<?> value)Add an Enum Attribute to the current node.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Integer value)Add the string representation of a value as an attribute to the current node.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Object value)Add the string representation of a value as an attribute to the current node.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.String value)Add a String Attribute to the current Node (handling nulls).static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.String[] value)Add a String[] attribute to the current node as a string of comma separated strings.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.util.Date value)Add a Date Attribute to the current Node.static voidaddAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.util.Locale value)Add a Locale Attribute to the current Node.static java.lang.StringgetAlias(java.lang.Class<?> type, com.thoughtworks.xstream.mapper.Mapper mapper)Get the serialized alias fortype.static java.lang.StringgetAlias(java.lang.Object value, com.thoughtworks.xstream.mapper.Mapper mapper)Get the serialized alias forvalue's class.static booleangetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, boolean defaultValue)Get a boolean attribute.static doublegetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, double defaultValue)Get a double attribute.static floatgetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, float defaultValue)Get a floating point attribute.static intgetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, int defaultValue)Get an int attribute.static int[]getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, int[] defaultValue)Get an integer array, represented as a comma separated string of integers.static longgetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, long defaultValue)Get a long attribute.static java.lang.BooleangetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Boolean defaultValue)Get a boolean attribute.static java.lang.Class<?>getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Class<?> defaultValue)Get an attribute that defines a class.static java.lang.StringgetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Enum<?> defaultValue)Get a Enum attribute as a string (which can be passed to enums valueOf or fromExternal).static java.lang.IntegergetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Integer defaultValue)Get an Integer attribute.static java.lang.StringgetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.String defaultValue)Get a String attribute.static java.lang.String[]getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.String[] defaultValue)Get a string array, represented as a comma separated array of strings.static java.util.DategetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.util.Date defaultValue)Add a Date Attribute to the current Node.static java.util.LocalegetAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.util.Locale defaultValue)Get a Locale Attribute from the current node.static java.lang.Class<?>getClass(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.mapper.Mapper mapper)Lookup the class to for the current node.static java.lang.Class<?>getClass(com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String alias)Lookup the class for an alias.static java.lang.StringgetClassName(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)Get the class name (or alias) for the current node.static <T> voidmarshalArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String name, T[] array)Marshals an array of objects of typeTwith its size as an attribute.static <T> voidmarshalArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String name, T[] array, int start, int count)Marshals an array of objects of typeTwith its size as an attribute.static <T> voidmarshalArray2D(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String parentName, java.lang.String childName, T[][] array, int start, int count)Marshal a 2D Array of typeT.static voidmarshalIntArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, int[] array)Marshals an int array with its size as an attribute and the elements as comma delimited strings.static voidmarshalIntArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, int[] array, int start, int count)Marshals an int array with its size as an attribute and the elements as comma delimited strings.static <T> voidmarshalList(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String name, java.util.List<T> list)Marshals a list of objects of typeTwith its size as an attribute.voidmarshalNode(java.lang.Object value, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)Marshal an object.static voidmarshalNode(java.lang.Object value, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper)Marshal an object.voidmarshalProperties(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String node, java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> iter)Marshal a map of properties.voidmarshalProperties(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String node, java.util.Map<java.lang.String,java.lang.Object> properties)static java.util.List<java.lang.String>readList(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Reads a liststatic <T> TreadSubObject(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Object current, java.lang.Class<T> clazz)Reads a sub-objectjava.lang.ThrowablereadThrowable(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Object current)Returns a throwable that was written with writeThrowable.voidsetMapper(com.thoughtworks.xstream.mapper.Mapper m)static <T> T[]unmarshalArray(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Unmarshals an array of object typeTthat has been marshaled bymarshalArray(HierarchicalStreamWriter, MarshallingContext, Mapper, String, Object[])static <T> T[][]unmarshalArray2D(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type, T[][] array)Unmarshals a 2D array of object typeTthat has been marshaled bymarshalArray2D(HierarchicalStreamWriter, MarshallingContext, Mapper, String, String, Object[][], int, int)static int[]unmarshalIntArray(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Unmarshals an int array marshaled withmarshalIntArray(HierarchicalStreamWriter, MarshallingContext, String, int[]).static <T> java.util.List<T>unmarshalList(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Unmarshals a list of object typeTthat has been marshaled bymarshalList(HierarchicalStreamWriter, MarshallingContext, Mapper, String, List)static <T> TunmarshalNode(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.<T> TunmarshalNode(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.static <T> TunmarshalNode(java.lang.Object current, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.<T> TunmarshalNode(java.lang.Object current, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.voidunmarshalProperties(java.util.Map<java.lang.String,java.lang.Object> properties, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Unmarshal a map of properties.voidunmarshalProperty(java.util.Map<java.lang.String,java.lang.Object> properties, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Unmarshals a single property fromreader, placing is name/value inpropertiesjava.lang.StringunmarshalPropertyName(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)java.lang.ObjectunmarshalPropertyValue(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)static voidwriteSubObject(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.Object value)Writes a sub-objectvoidwriteSubObject(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, java.lang.Object value)Writes a sub-object.voidwriteThrowable(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, java.lang.Throwable value)Writes a throwable with element namename.
-
-
-
Field Detail
-
NULL
public static final java.lang.String NULL
Element name for "null" elements- See Also:
- Constant Field Values
-
mapper
protected com.thoughtworks.xstream.mapper.Mapper mapper
The mapper
-
-
Method Detail
-
setMapper
public void setMapper(com.thoughtworks.xstream.mapper.Mapper m)
-
marshalProperties
public void marshalProperties(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String node, java.util.Map<java.lang.String,java.lang.Object> properties)
-
marshalProperties
public void marshalProperties(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String node, java.util.Iterator<java.util.Map.Entry<java.lang.String,java.lang.Object>> iter)Marshal a map of properties.NOTE: the containing "node" is not marshalled with this method, you should do so yourself.
-
unmarshalProperties
public void unmarshalProperties(java.util.Map<java.lang.String,java.lang.Object> properties, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Unmarshal a map of properties.
-
unmarshalPropertyName
public java.lang.String unmarshalPropertyName(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)
-
unmarshalPropertyValue
public java.lang.Object unmarshalPropertyValue(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
-
unmarshalProperty
public void unmarshalProperty(java.util.Map<java.lang.String,java.lang.Object> properties, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Unmarshals a single property fromreader, placing is name/value inproperties
-
marshalNode
public static void marshalNode(java.lang.Object value, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper)Marshal an object.
-
marshalNode
public void marshalNode(java.lang.Object value, com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context)Marshal an object.
-
unmarshalNode
public <T> T unmarshalNode(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.
-
unmarshalNode
public <T> T unmarshalNode(java.lang.Object current, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.
-
unmarshalNode
public static <T> T unmarshalNode(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.
-
unmarshalNode
public static <T> T unmarshalNode(java.lang.Object current, com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Use convertAnother to unmarshal an object properly.
-
marshalIntArray
public static void marshalIntArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, int[] array)Marshals an int array with its size as an attribute and the elements as comma delimited strings.
-
marshalIntArray
public static void marshalIntArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, int[] array, int start, int count)Marshals an int array with its size as an attribute and the elements as comma delimited strings.
-
unmarshalIntArray
public static int[] unmarshalIntArray(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Unmarshals an int array marshaled withmarshalIntArray(HierarchicalStreamWriter, MarshallingContext, String, int[]).- Returns:
- the int array
-
marshalArray
public static <T> void marshalArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String name, T[] array)Marshals an array of objects of typeTwith its size as an attribute.
-
marshalArray
public static <T> void marshalArray(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String name, T[] array, int start, int count)Marshals an array of objects of typeTwith its size as an attribute.
-
unmarshalArray
public static <T> T[] unmarshalArray(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Unmarshals an array of object typeTthat has been marshaled bymarshalArray(HierarchicalStreamWriter, MarshallingContext, Mapper, String, Object[])- Returns:
- the object array
-
marshalArray2D
public static <T> void marshalArray2D(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String parentName, java.lang.String childName, T[][] array, int start, int count)Marshal a 2D Array of typeT.
-
unmarshalArray2D
public static <T> T[][] unmarshalArray2D(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type, T[][] array)Unmarshals a 2D array of object typeTthat has been marshaled bymarshalArray2D(HierarchicalStreamWriter, MarshallingContext, Mapper, String, String, Object[][], int, int)- Returns:
- the object array
-
marshalList
public static <T> void marshalList(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String name, java.util.List<T> list)Marshals a list of objects of typeTwith its size as an attribute.
-
unmarshalList
public static <T> java.util.List<T> unmarshalList(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.Class<T> type)Unmarshals a list of object typeTthat has been marshaled bymarshalList(HierarchicalStreamWriter, MarshallingContext, Mapper, String, List)
-
writeThrowable
public void writeThrowable(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, java.lang.Throwable value)Writes a throwable with element namename. The class of the throwable is written as an attribute.
-
readThrowable
public java.lang.Throwable readThrowable(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Object current)Returns a throwable that was written with writeThrowable.
-
writeSubObject
public void writeSubObject(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.String name, java.lang.Object value)Writes a sub-object.
-
writeSubObject
public static void writeSubObject(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, com.thoughtworks.xstream.converters.MarshallingContext context, java.lang.Object value)Writes a sub-object
-
readSubObject
public static <T> T readSubObject(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, java.lang.Object current, java.lang.Class<T> clazz)Reads a sub-object
-
readList
public static java.util.List<java.lang.String> readList(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)Reads a list
-
getAlias
public static java.lang.String getAlias(java.lang.Object value, com.thoughtworks.xstream.mapper.Mapper mapper)Get the serialized alias forvalue's class.
-
getAlias
public static java.lang.String getAlias(java.lang.Class<?> type, com.thoughtworks.xstream.mapper.Mapper mapper)Get the serialized alias fortype.
-
getClass
public static java.lang.Class<?> getClass(com.thoughtworks.xstream.mapper.Mapper mapper, java.lang.String alias)Lookup the class for an alias.
-
getClass
public static java.lang.Class<?> getClass(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.mapper.Mapper mapper)Lookup the class to for the current node.
-
getClassName
public static java.lang.String getClassName(com.thoughtworks.xstream.io.HierarchicalStreamReader reader)
Get the class name (or alias) for the current node.
-
getAttribute
public static java.lang.String getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.String defaultValue)Get a String attribute.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Object value)Add the string representation of a value as an attribute to the current node.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Boolean value)Add the string representation of a value as an attribute to the current node.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Integer value)Add the string representation of a value as an attribute to the current node.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.String value)Add a String Attribute to the current Node (handling nulls).
-
getAttribute
public static java.lang.String getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Enum<?> defaultValue)Get a Enum attribute as a string (which can be passed to enums valueOf or fromExternal).
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.Class<?> value)Add an Enum Attribute to the current node.
-
getAttribute
public static java.lang.Class<?> getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Class<?> defaultValue)Get an attribute that defines a class.
-
getAttribute
public static boolean getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, boolean defaultValue)Get a boolean attribute.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, long value)Add a long attribute to the current node.
-
getAttribute
public static long getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, long defaultValue)Get a long attribute.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, int value)Add an integer attribute to the current node.
-
getAttribute
public static int getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, int defaultValue)Get an int attribute.
-
getAttribute
public static java.lang.Integer getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Integer defaultValue)Get an Integer attribute.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, int[] value)Add a int[] attribute to the current node as a string of comma separated integers.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, int[] value, int count)Add a int[] attribute to the current node as a string of comma separated integers.
-
getAttribute
public static int[] getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, int[] defaultValue)Get an integer array, represented as a comma separated string of integers.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.lang.String[] value)Add a String[] attribute to the current node as a string of comma separated strings.
-
getAttribute
public static java.lang.String[] getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.String[] defaultValue)Get a string array, represented as a comma separated array of strings.
-
getAttribute
public static java.lang.Boolean getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.lang.Boolean defaultValue)Get a boolean attribute.
-
getAttribute
public static float getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, float defaultValue)Get a floating point attribute.
-
getAttribute
public static double getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, double defaultValue)Get a double attribute.
-
getAttribute
public static java.util.Date getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.util.Date defaultValue)Add a Date Attribute to the current Node.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.util.Date value)Add a Date Attribute to the current Node.
-
getAttribute
public static java.util.Locale getAttribute(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, java.lang.String attribute, java.util.Locale defaultValue)Get a Locale Attribute from the current node.
-
addAttribute
public static void addAttribute(com.thoughtworks.xstream.io.HierarchicalStreamWriter writer, java.lang.String attribute, java.util.Locale value)Add a Locale Attribute to the current Node.
-
-