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

The CollectionFactory is used to create collection instances that are compatible with the field type. This performs resolution of the collection class by firstly consulting the specified Strategy implementation. If the strategy cannot resolve the collection class then this will select a type from the Java Collections framework, if a compatible one exists.
상속: Factory
파일 보기 프로젝트 열기: ngallagher/simplexml 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
CollectionFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy

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

GetConversion ( Class type ) : Class

This is used to convert the provided type to a collection type from the Java Collections framework. This will check to see if the type is a List or Set and return an ArrayList or HashSet type. If no suitable match can be found this throws an exception.

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

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

메소드 상세

CollectionFactory() 공개 메소드

Constructor for the CollectionFactory object. This is given the field type as taken from the owning object. The given type is used to determine the collection instance created.
public CollectionFactory ( Context context, Type type ) : SimpleFramework.Xml.Strategy
context Context /// this is the context associated with this factory ///
type System.Type /// this is the class for the owning object ///
리턴 SimpleFramework.Xml.Strategy

GetConversion() 공개 메소드

This is used to convert the provided type to a collection type from the Java Collections framework. This will check to see if the type is a List or Set and return an ArrayList or HashSet 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 ///
리턴 Class

GetInstance() 공개 메소드

public GetInstance ( InputNode node ) : Instance
node InputNode /// this is the input node representing the list ///
리턴 Instance

GetInstance() 공개 메소드

This creates a Collection instance from the type provided. If the type provided is abstract or an interface then this can promote the type to a collection 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 collection ///
리턴 Instance