C# 클래스 SimpleFramework.Xml.Core.Variable

The Variable object is used to represent a variable for a method or field of a deserialized object. It has the value for the field or method as well as the details from the annotation. This is used by the Collector to populate an object once all the values for that object have been collected.
상속: Label
파일 보기 프로젝트 열기: ngallagher/simplexml

공개 메소드들

메소드 설명
GetConverter ( Context context ) : Converter
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.

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.

IsAttribute ( ) : bool

This method is used to determine if the label represents an attribute. This is used to style the name so that elements are styled as elements and attributes are styled as required.

IsCollection ( ) : bool

This is used to determine if the label is a collection. If the label represents a collection then any original assignment to the field or method can be written to without the need to create a new collection. This allows obscure collections to be used and also allows initial entries to be maintained.

IsData ( ) : bool
IsInline ( ) : bool

This is used to determine whether the label represents an inline XML entity. The ElementList annotation and the Text annotation represent inline items. This means that they contain no containing element and so can not specify overrides or special attributes.

IsRequired ( ) : bool

Determines whether the XML attribute or element is required. This ensures that if an XML element is missing from a document that deserialization can continue. Also, in the process of serialization, if a value is null it does not need to be written to the resulting XML document.

ToString ( ) : String

This is used to describe the annotation and method or field that this label represents. This is used to provide error messages that can be used to debug issues that occur when processing a method. This should provide enough information such that the problem can be isolated correctly.

Variable ( Label label, Object value ) : SimpleFramework.Xml.Strategy

Constructor for the Variable object. This is used to create an object that holds a deserialized value, as well as the details of the annotated method or field it is to be set to. This allows the value to be repeatedly deserialized.

메소드 상세

GetConverter() 공개 메소드

public GetConverter ( Context context ) : Converter
context Context /// this is the context object for the serialization ///
리턴 Converter

GetEmpty() 공개 메소드

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 ///
리턴 Object

GetName() 공개 메소드

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 /// this is the context used to style the name ///
리턴 String

IsAttribute() 공개 메소드

This method is used to determine if the label represents an attribute. This is used to style the name so that elements are styled as elements and attributes are styled as required.
public IsAttribute ( ) : bool
리턴 bool

IsCollection() 공개 메소드

This is used to determine if the label is a collection. If the label represents a collection then any original assignment to the field or method can be written to without the need to create a new collection. This allows obscure collections to be used and also allows initial entries to be maintained.
public IsCollection ( ) : bool
리턴 bool

IsData() 공개 메소드

public IsData ( ) : bool
리턴 bool

IsInline() 공개 메소드

This is used to determine whether the label represents an inline XML entity. The ElementList annotation and the Text annotation represent inline items. This means that they contain no containing element and so can not specify overrides or special attributes.
public IsInline ( ) : bool
리턴 bool

IsRequired() 공개 메소드

Determines whether the XML attribute or element is required. This ensures that if an XML element is missing from a document that deserialization can continue. Also, in the process of serialization, if a value is null it does not need to be written to the resulting XML document.
public IsRequired ( ) : bool
리턴 bool

ToString() 공개 메소드

This is used to describe the annotation and method or field that this label represents. This is used to provide error messages that can be used to debug issues that occur when processing a method. This should provide enough information such that the problem can be isolated correctly.
public ToString ( ) : String
리턴 String

Variable() 공개 메소드

Constructor for the Variable object. This is used to create an object that holds a deserialized value, as well as the details of the annotated method or field it is to be set to. This allows the value to be repeatedly deserialized.
public Variable ( Label label, Object value ) : SimpleFramework.Xml.Strategy
label Label /// this is the label for the field or method used ///
value Object /// the deserialized object for the method or field ///
리턴 SimpleFramework.Xml.Strategy