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

The ObjectInstance is used to instantiate an object from the criteria provided in the given Value. If the value contains a reference then the reference is provided from this type. For performance the Context object is used to instantiate the object as it contains a reflection cache of constructors.
상속: Instance
파일 보기 프로젝트 열기: ngallagher/simplexml

공개 메소드들

메소드 설명
GetInstance ( Class type ) : Object
IsReference ( ) : bool

This is used to determine if the type is a reference type. A reference type is a type that does not require any XML deserialization based on its annotations. Types that are references could be substitutes objects are existing ones.

ObjectInstance ( Context context, Value value ) : SimpleFramework.Xml.Strategy

Constructor for the ObjectInstance object. This is used to create an instance of the type described by the value object. If the value object contains a reference then this will simply provide that reference.

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.

메소드 상세

GetInstance() 공개 메소드

public GetInstance ( Class type ) : Object
type Class /// this is the type that is to be instantiated ///
리턴 Object

IsReference() 공개 메소드

This is used to determine if the type is a reference type. A reference type is a type that does not require any XML deserialization based on its annotations. Types that are references could be substitutes objects are existing ones.
public IsReference ( ) : bool
리턴 bool

ObjectInstance() 공개 메소드

Constructor for the ObjectInstance object. This is used to create an instance of the type described by the value object. If the value object contains a reference then this will simply provide that reference.
public ObjectInstance ( Context context, Value value ) : SimpleFramework.Xml.Strategy
context Context /// this is used to instantiate the object ///
value Value /// this is the value describing the instance ///
리턴 SimpleFramework.Xml.Strategy

SetInstance() 공개 메소드

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