C# Class SimpleFramework.Xml.Core.FieldContact

The FieldContact object is used to act as a contact for a field within an object. This allows a value to be set on an object field during deserialization and acquired from the same field during serialization.
Inheritance: Contact
Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
FieldContact ( Field field, Annotation label ) : System

Constructor for the FieldContact object. This is used as a point of contact for a field within a schema class. Values can be read and written directly to the field with this.

Get ( Object source ) : Object

This is used to get the specified value on the provided object. The value returned from this method will be an instance of the contact class type. If the returned object is of a different type then the serialization process will fail.

GetName ( Field field ) : String
IsFinal ( ) : bool

This is used to identify annotated methods are fields that can not be modified. Such field will require that there is a constructor that can have the value injected in to it.

IsReadOnly ( ) : bool

This is used to determine if the annotated contact is for a read only variable. A read only variable is a field that can be set from within the constructor such as a blank readonly variable. It can also be a method with no set counterpart.

IsStatic ( ) : bool

This is used to determine if the annotated contact is for a static field or method. A static field or method is one that contains the "static" keyword. Any const fields will be read only and does not require any matching annotation.

Set ( Object source, Object value ) : void

This is used to set the specified value on the provided object. The value provided must be an instance of the contact class so that it can be set without a runtime class compatibility error.

ToString ( ) : String

This is used to describe the contact as it exists within the owning class. It is used to provide error messages that can be used to debug issues that occur when processing a contact. The string provided is the generic field string.

Private Methods

Méthode Description
getAnnotation ( Class type ) : T

Method Details

FieldContact() public méthode

Constructor for the FieldContact object. This is used as a point of contact for a field within a schema class. Values can be read and written directly to the field with this.
public FieldContact ( Field field, Annotation label ) : System
field Field /// this is the field that is the point of contact ///
label Annotation /// this is the annotation that is used by the field ///
Résultat System

Get() public méthode

This is used to get the specified value on the provided object. The value returned from this method will be an instance of the contact class type. If the returned object is of a different type then the serialization process will fail.
public Get ( Object source ) : Object
source Object /// this is the object to acquire the value from ///
Résultat Object

GetName() public méthode

public GetName ( Field field ) : String
field Field /// the field to acquire the internalized name from ///
Résultat String

IsFinal() public méthode

This is used to identify annotated methods are fields that can not be modified. Such field will require that there is a constructor that can have the value injected in to it.
public IsFinal ( ) : bool
Résultat bool

IsReadOnly() public méthode

This is used to determine if the annotated contact is for a read only variable. A read only variable is a field that can be set from within the constructor such as a blank readonly variable. It can also be a method with no set counterpart.
public IsReadOnly ( ) : bool
Résultat bool

IsStatic() public méthode

This is used to determine if the annotated contact is for a static field or method. A static field or method is one that contains the "static" keyword. Any const fields will be read only and does not require any matching annotation.
public IsStatic ( ) : bool
Résultat bool

Set() public méthode

This is used to set the specified value on the provided object. The value provided must be an instance of the contact class so that it can be set without a runtime class compatibility error.
public Set ( Object source, Object value ) : void
source Object /// this is the object to set the value on ///
value Object /// this is the value that is to be set on the object ///
Résultat void

ToString() public méthode

This is used to describe the contact as it exists within the owning class. It is used to provide error messages that can be used to debug issues that occur when processing a contact. The string provided is the generic field string.
public ToString ( ) : String
Résultat String