C# Class SimpleFramework.Xml.Core.MapFactory

The MapFactory is used to create map instances that are compatible with the field type. This performs resolution of the map class by consulting the specified Strategy implementation. If the strategy cannot resolve the map class then this will select a type from the Java Collections framework, if a compatible one exists.
Inheritance: Factory
Afficher le fichier Open project: ngallagher/simplexml Class Usage Examples

Méthodes publiques

Méthode Description
GetConversion ( Class type ) : Class

This is used to convert the provided type to a map object type from the Java Collections framework. This will check to see if the type is a Map or SortedMap and return a HashMap or TreeSet type. If no suitable match can be found this throws an exception.

GetInstance ( InputNode node ) : Instance
GetInstance ( Value value ) : Instance

This creates a Map object instance from the type provided. If the type provided is abstract or an interface then this can promote the type to a map object type that can be instantiated. This is done by asking the type to convert itself.

MapFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy

Constructor for the MapFactory object. This is given the field type as taken from the owning object. The given type is used to determine the map instance created.

Method Details

GetConversion() public méthode

This is used to convert the provided type to a map object type from the Java Collections framework. This will check to see if the type is a Map or SortedMap and return a HashMap or TreeSet type. If no suitable match can be found this throws an exception.
public GetConversion ( Class type ) : Class
type Class /// this is the type that is to be converted ///
Résultat Class

GetInstance() public méthode

public GetInstance ( InputNode node ) : Instance
node InputNode /// this is the input node representing the list ///
Résultat Instance

GetInstance() public méthode

This creates a Map object instance from the type provided. If the type provided is abstract or an interface then this can promote the type to a map object type that can be instantiated. This is done by asking the type to convert itself.
public GetInstance ( Value value ) : Instance
value Value /// the type used to instantiate the map object ///
Résultat Instance

MapFactory() public méthode

Constructor for the MapFactory object. This is given the field type as taken from the owning object. The given type is used to determine the map instance created.
public MapFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy
context Context /// this is the context object for this factory ///
type System.Type /// this is the class for the owning object ///
Résultat SimpleFramework.Xml.Strategy