Package net.sf.antcontrib.cpptasks.apple
Class PropertyListSerialization
- java.lang.Object
-
- net.sf.antcontrib.cpptasks.apple.PropertyListSerialization
-
public final class PropertyListSerialization extends java.lang.ObjectStatic 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 Modifier Constructor Description privatePropertyListSerialization()Private constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidserialize(java.util.Map propertyList, java.util.List comments, java.io.File file)Serializes a property list into a Cocoa XML Property List document.private static voidserializeBoolean(java.lang.Boolean val, org.xml.sax.ContentHandler handler)Serialize a Boolean as a true or false element.private static voidserializeElement(java.lang.String tag, java.lang.String content, org.xml.sax.ContentHandler handler)Creates an element with the specified tag name and character content.private static voidserializeInteger(java.lang.Number integer, org.xml.sax.ContentHandler handler)Serialize a Number as an integer element.private static voidserializeList(java.util.List list, org.xml.sax.ContentHandler handler)Serialize a list as an array element.private static voidserializeMap(java.util.Map map, org.xml.sax.ContentHandler handler)Serialize a map as a dict element.private static voidserializeObject(java.lang.Object obj, org.xml.sax.ContentHandler handler)Serialize an object using the best available element.private static voidserializeReal(java.lang.Number real, org.xml.sax.ContentHandler handler)Serialize a Number as a real element.private static voidserializeString(java.lang.String val, org.xml.sax.ContentHandler handler)Serialize a string as a string element.
-
-
-
Method Detail
-
serialize
public static void serialize(java.util.Map propertyList, java.util.List comments, java.io.File file) throws java.io.IOException, org.xml.sax.SAXException, javax.xml.transform.TransformerConfigurationExceptionSerializes a property list into a Cocoa XML Property List document.- Parameters:
propertyList- property list.file- destination.comments- comments to insert into document.- Throws:
org.xml.sax.SAXException- if exception during serialization.javax.xml.transform.TransformerConfigurationException- if exception creating serializer.java.io.IOException
-
serializeMap
private static void serializeMap(java.util.Map map, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionSerialize a map as a dict element.- Parameters:
map- map to serialize.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
serializeList
private static void serializeList(java.util.List list, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionSerialize a list as an array element.- Parameters:
list- list to serialize.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
serializeElement
private static void serializeElement(java.lang.String tag, java.lang.String content, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionCreates an element with the specified tag name and character content.- Parameters:
tag- tag name.content- character content.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
serializeInteger
private static void serializeInteger(java.lang.Number integer, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionSerialize a Number as an integer element.- Parameters:
integer- number to serialize.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
serializeReal
private static void serializeReal(java.lang.Number real, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionSerialize a Number as a real element.- Parameters:
real- number to serialize.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
serializeBoolean
private static void serializeBoolean(java.lang.Boolean val, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionSerialize a Boolean as a true or false element.- Parameters:
val- boolean to serialize.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
serializeString
private static void serializeString(java.lang.String val, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionSerialize a string as a string element.- Parameters:
val- string to serialize.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
serializeObject
private static void serializeObject(java.lang.Object obj, org.xml.sax.ContentHandler handler) throws org.xml.sax.SAXExceptionSerialize an object using the best available element.- Parameters:
obj- object to serialize.handler- destination of serialization events.- Throws:
org.xml.sax.SAXException- if exception during serialization.
-
-