Class XmlTypeValueSerializeStrategy

  extended by net.sf.sasl.language.placeholder.aop.resolver.typevalue.XmlTypeValueSerializeStrategy
All Implemented Interfaces:

public class XmlTypeValueSerializeStrategy
extends Object
implements ITypeValueSerializeStrategy

Serializes the toSerializeObjects over the XStream-library, which produces xml-code. If names[i] is not null for toSerializeObjects[i] than the xml-code for toSerializeObjects[i] will be grouped under the <names[i]> node.
The serialized output may not be 100% valid xml-code, because there will not be an root node inserted if toSerializeObjects.length > 1.
The argumentMap can contain the key "almostXml" in which case xml special chars like &, >, <,... will not get encoded to their xml-entities.

0.0.2 (sasl-common-aspect-library)
Philipp Förmer

Constructor Summary
Method Summary
 String serialize(Object[] toSerializeObjects, String[] parameterNames, Map<String,Object> argumentMap)
          Serializes the given toSerializeObjects and returns the serialized output.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public XmlTypeValueSerializeStrategy()
Method Detail


public String serialize(Object[] toSerializeObjects,
                        String[] parameterNames,
                        Map<String,Object> argumentMap)
Description copied from interface: ITypeValueSerializeStrategy
Serializes the given toSerializeObjects and returns the serialized output. The names array could be filled with parameter names or something else and should have the same length as the toSerializeObjects array. The argumentMap could be used to pass additional special values to the serializer.

Specified by:
serialize in interface ITypeValueSerializeStrategy
toSerializeObjects - non null.
parameterNames - non null.
argumentMap - non null.
non null serialized output.
See Also:
ITypeValueSerializeStrategy.serialize(java.lang.Object[], java.lang.String[], java.util.Map)

Copyright © 2010. All Rights Reserved.