C# Class SimpleFramework.Xml.Core.ConversionInstance

The ConversionInstance object is used to promote the type to some more specialized type. For example if a field or method that represents a List is annotated then this might create a specialized type such as a Vector. It typically used to promote a type either because it is abstract or because another type is required.

This is used by the CollectionFactory to convert the type of a collection field from an abstract type to a instantiable type. This is used to simplify strategy implementations.

Inheritance: Instance
Afficher le fichier Open project: ngallagher/simplexml

Méthodes publiques

Méthode Description
ConversionInstance ( Context context, Value value, Class convert ) : SimpleFramework.Xml.Strategy

This is used to specify the creation of a conversion type that can be used for creating an instance with a class other than the default class specified by the Value object.

GetInstance ( Class type ) : Object
IsReference ( ) : bool
SetInstance ( Object Object ) : Object

This method is used acquire the value from the type and if possible replace the value for the type. If the value can not be replaced then an exception should be thrown. This is used to allow primitives to be inserted into a graph.

Method Details

ConversionInstance() public méthode

This is used to specify the creation of a conversion type that can be used for creating an instance with a class other than the default class specified by the Value object.
public ConversionInstance ( Context context, Value value, Class convert ) : SimpleFramework.Xml.Strategy
context Context /// this is the context used for instantiation ///
value Value /// this is the type used to create the instance ///
convert Class /// this is the class the type is converted to ///
Résultat SimpleFramework.Xml.Strategy

GetInstance() public méthode

public GetInstance ( Class type ) : Object
type Class /// this is the type of the instance to create ///
Résultat Object

IsReference() public méthode

public IsReference ( ) : bool
Résultat bool

SetInstance() public méthode

This method is used acquire the value from the type and if possible replace the value for the type. If the value can not be replaced then an exception should be thrown. This is used to allow primitives to be inserted into a graph.
public SetInstance ( Object Object ) : Object
Object Object
Résultat Object