/// <summary> /// Constructor for the <c>PrimitiveList</c> object. This is /// given the list type and entry type to be used. The list type is /// the <c>Collection</c> implementation that deserialized /// entry objects are inserted into. /// </summary> /// <param name="context"> /// this is the context object used for serialization /// </param> /// <param name="type"> /// this is the collection type for the list used /// </param> /// <param name="entry"> /// the primitive type to be stored within the list /// </param> /// <param name="parent"> /// this is the name to wrap the list element with /// </param> public PrimitiveList(Context context, Type type, Type entry, String parent) { this.factory = new CollectionFactory(context, type); this.root = new Primitive(context, entry); this.parent = parent; this.entry = entry; }
/// <summary> /// Constructor for the <c>Composite</c> object. This creates /// a converter object capable of serializing and deserializing root /// objects labeled with XML annotations. The XML schema class must /// be given to the instance in order to perform deserialization. /// </summary> /// <param name="context"> /// the source object used to perform serialization /// </param> /// <param name="type"> /// this is the XML schema type to use for this /// </param> public Composite(Context context, Type type) { this.factory = new ObjectFactory(context, type); this.primitive = new Primitive(context, type); this.criteria = new Collector(context); this.revision = new Revision(); this.context = context; this.type = type; }
/// <summary> /// Constructor for the <c>PrimitiveKey</c> object. This is /// used to create the key object which converts the map key to an /// instance of the key type. This can also resolve references. /// </summary> /// <param name="context"> /// this is the context object used for serialization /// </param> /// <param name="entry"> /// this is the entry object that describes entries /// </param> /// <param name="type"> /// this is the type that this converter deals with /// </param> public PrimitiveKey(Context context, Entry entry, Type type) { this.factory = new PrimitiveFactory(context, type); this.root = new Primitive(context, type); this.style = context.Style; this.context = context; this.entry = entry; this.type = type; }
/// <summary> /// Constructor for the <c>PrimitiveArray</c> object. This is /// given the array type for the contact that is to be converted. An /// array of the specified type is used to hold the deserialized /// elements and will be the same length as the number of elements. /// </summary> /// <param name="context"> /// this is the context object used for serialization /// </param> /// <param name="type"> /// this is the actual field type from the schema /// </param> /// <param name="entry"> /// the entry type to be stored within the array /// </param> /// <param name="parent"> /// this is the name to wrap the array element with /// </param> public PrimitiveArray(Context context, Type type, Type entry, String parent) { this.factory = new ArrayFactory(context, type); this.root = new Primitive(context, entry); this.parent = parent; this.entry = entry; }