Package net.sf.antcontrib.cpptasks.apple
Class PropertyListSerialization
java.lang.Object
net.sf.antcontrib.cpptasks.apple.PropertyListSerialization
Static class that provides methods to serialize
a Map to a Cocoa XML Property List. Does not currently support
date or data elements.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidSerializes a property list into a Cocoa XML Property List document.private static voidserializeBoolean(Boolean val, ContentHandler handler) Serialize a Boolean as a true or false element.private static voidserializeElement(String tag, String content, ContentHandler handler) Creates an element with the specified tag name and character content.private static voidserializeInteger(Number integer, ContentHandler handler) Serialize a Number as an integer element.private static voidserializeList(List list, ContentHandler handler) Serialize a list as an array element.private static voidserializeMap(Map map, ContentHandler handler) Serialize a map as a dict element.private static voidserializeObject(Object obj, ContentHandler handler) Serialize an object using the best available element.private static voidserializeReal(Number real, ContentHandler handler) Serialize a Number as a real element.private static voidserializeString(String val, ContentHandler handler) Serialize a string as a string element.
-
Constructor Details
-
PropertyListSerialization
private PropertyListSerialization()Private constructor.
-
-
Method Details
-
serialize
public static void serialize(Map propertyList, List comments, File file) throws IOException, SAXException, TransformerConfigurationException Serializes a property list into a Cocoa XML Property List document.- Parameters:
propertyList- property list.comments- comments to insert into document.file- destination.- Throws:
SAXException- if exception during serialization.TransformerConfigurationException- if exception creating serializer.IOException
-
serializeMap
Serialize a map as a dict element.- Parameters:
map- map to serialize.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-
serializeList
Serialize a list as an array element.- Parameters:
list- list to serialize.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-
serializeElement
private static void serializeElement(String tag, String content, ContentHandler handler) throws SAXException Creates an element with the specified tag name and character content.- Parameters:
tag- tag name.content- character content.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-
serializeInteger
Serialize a Number as an integer element.- Parameters:
integer- number to serialize.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-
serializeReal
Serialize a Number as a real element.- Parameters:
real- number to serialize.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-
serializeBoolean
Serialize a Boolean as a true or false element.- Parameters:
val- boolean to serialize.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-
serializeString
Serialize a string as a string element.- Parameters:
val- string to serialize.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-
serializeObject
Serialize an object using the best available element.- Parameters:
obj- object to serialize.handler- destination of serialization events.- Throws:
SAXException- if exception during serialization.
-