C# Class SimpleFramework.Xml.Core.ElementListLabel

The ElementListLabel represents a label that is used to represent an XML element list in a class schema. This element list label can be used to convert an XML node into a collection of composite objects. Each element converted with the converter this creates must be an XML serializable element.
Inheritance: Label
显示文件 Open project: ngallagher/simplexml

Public Methods

Method Description
ElementListLabel ( Contact contact, ElementList label ) : SimpleFramework.Xml.Strategy

Constructor for the ElementListLabel object. This creates a label object, which can be used to convert an XML node to a Collection of XML serializable objects.

GetConverter ( Context context ) : Converter
GetConverter ( Context context, String name ) : Converter

This will create a Converter for transforming an XML element into a collection of XML serializable objects. The XML schema class for these objects must be present the element list annotation.

GetEmpty ( Context context ) : Object

This is used to provide a configured empty value used when the annotated value is null. This ensures that XML can be created with required details regardless of whether values are null or not. It also provides a means for sensible default values.

GetEntry ( Context context ) : String

This is used to either provide the entry value provided within the annotation or compute a entry value. If the entry string is not provided the the entry value is calculated as the type of primitive the object is as a simplified class name.

GetInlineConverter ( Context context, String name ) : Converter

This will create a Converter for transforming an XML element into a collection of XML serializable objects. The XML schema class for these objects must be present the element list annotation.

GetName ( Context context ) : String

This is used to acquire the name of the element or attribute that is used by the class schema. The name is determined by checking for an override within the annotation. If it contains a name then that is used, if however the annotation does not specify a name the the field or method name is used instead.

Private Methods

Method Description
ElementException ( ) : SimpleFramework.Xml.Strategy

Method Details

ElementListLabel() public method

Constructor for the ElementListLabel object. This creates a label object, which can be used to convert an XML node to a Collection of XML serializable objects.
public ElementListLabel ( Contact contact, ElementList label ) : SimpleFramework.Xml.Strategy
contact Contact /// this is the contact that this label represents ///
label SimpleFramework.Xml.ElementList /// the annotation that contains the schema details ///
return SimpleFramework.Xml.Strategy

GetConverter() public method

public GetConverter ( Context context ) : Converter
context Context /// this is the context object used for serialization ///
return Converter

GetConverter() public method

This will create a Converter for transforming an XML element into a collection of XML serializable objects. The XML schema class for these objects must be present the element list annotation.
public GetConverter ( Context context, String name ) : Converter
context Context /// this is the context object used for serialization ///
name String /// this is the name of the XML entry element to use ///
return Converter

GetEmpty() public method

This is used to provide a configured empty value used when the annotated value is null. This ensures that XML can be created with required details regardless of whether values are null or not. It also provides a means for sensible default values.
public GetEmpty ( Context context ) : Object
context Context /// this is the context object for the serialization ///
return Object

GetEntry() public method

This is used to either provide the entry value provided within the annotation or compute a entry value. If the entry string is not provided the the entry value is calculated as the type of primitive the object is as a simplified class name.
public GetEntry ( Context context ) : String
context Context /// this is the context used to style the entry ///
return String

GetInlineConverter() public method

This will create a Converter for transforming an XML element into a collection of XML serializable objects. The XML schema class for these objects must be present the element list annotation.
public GetInlineConverter ( Context context, String name ) : Converter
context Context /// this is the context object used for serialization ///
name String
return Converter

GetName() public method

This is used to acquire the name of the element or attribute that is used by the class schema. The name is determined by checking for an override within the annotation. If it contains a name then that is used, if however the annotation does not specify a name the the field or method name is used instead.
public GetName ( Context context ) : String
context Context
return String