C# Class Simpl.Serialization.FieldDescriptor

A class that "Describes" the different aspects of a field in a given class that can be handled via S.im.pl
Inheritance: DescriptorBase
Datei anzeigen Open project: ecologylab/simplCSharp Class Usage Examples

Public Properties

Property Type Description
IGNORED_ELEMENT_FIELD_DESCRIPTOR FieldDescriptor
Null String

Public Methods

Method Description
AddLeafNodeToCollection ( object root, string value, TranslationContext translationContext ) : void
AppendCollectionScalarValue ( TextWriter textWriter, object obj, TranslationContext translationContext, System.Text.Format format ) : void
AppendValue ( TextWriter textWriter, object obj, TranslationContext translationContext, System.Text.Format format ) : void
AutomaticLazyGetCollectionOrMap ( object root ) : Object
ChildClassDescriptor ( string currentTagName ) : ClassDescriptor
Clone ( ) : FieldDescriptor

make a SHALLOW copy of this descriptor.

ContextSimplEquals ( object leftContext, object rightContext ) : bool

Performs a value equality check on the values in LHS and RHS described by this field.

FieldDescriptor ( ClassDescriptor baseClassDescriptor ) : System
FieldDescriptor ( ClassDescriptor baseClassDescriptor, FieldDescriptor wrappedFD, String wrapperTag ) : System
FieldDescriptor ( ClassDescriptor declaringClassDescriptor, FieldInfo field, int annotationType ) : System
GetChildClassDescriptor ( int tlvType ) : ClassDescriptor
GetCollection ( Object context ) : ICollection
GetGenericTypeVars ( ) : List
GetGenericTypeVarsContext ( ) : List
GetMapKeyFieldValue ( Object mapElement ) : Object
GetNested ( object context ) : object
GetObject ( object contextObject ) : object

Obtains the value decribed by this FieldDescriptor, with the given object used as Context

GetValue ( Object context ) : Object
GetValueString ( object context ) : string
IsCollectionTag ( string currentTag ) : bool
IsDefaultValue ( String value ) : bool
IsDefaultValueFromContext ( object context ) : bool
MakeIgnoredFieldDescriptor ( string currentTag ) : FieldDescriptor
ResolveUnresolvedClassesAnnotation ( ) : System.Boolean
ResolveUnresolvedScopeAnnotation ( ) : System.Boolean
SetElementClassDescriptor ( ClassDescriptor elementClassDescriptor ) : void
SetFieldBaseClassGeneric ( Type superClassGenericArguments ) : void
SetFieldToComposite ( object root, object subRoot ) : void
SetFieldToScalar ( object root, string value, TranslationContext translationContext ) : void
SetGenericTypeVars ( List derivedGenericTypeVariables ) : void
ToString ( ) : string

Private Methods

Method Description
DeriveGenericTypeVariables ( ) : void
DeriveNestedSerialization ( FieldInfo thatField, int annotationType ) : int
DerivePolymorphicDescriptors ( FieldInfo pField ) : void
DeriveScalarSerialization ( FieldInfo scalarField ) : int
DeriveScalarSerialization ( Type thatType, FieldInfo scalarField ) : int
FieldDescriptor ( ) : System
FieldDescriptor ( String tag ) : System
GetTypeArgs ( FieldInfo thatField, int i ) : Type
InitPolymorphicClassDescriptorsList ( Int32 size ) : void
InitTagClassDescriptorsArrayList ( int initialSize ) : void
RegisterPolymorphicDescriptor ( ClassDescriptor classDescriptor ) : void
ResolveClassesAnnotation ( Type classesAnnotation ) : System.Boolean
ResolveScopeAnnotation ( string scopeAnnotation ) : bool
ResolveScopeAttribute ( string scopeAttributeValue ) : bool

Method Details

AddLeafNodeToCollection() public method

public AddLeafNodeToCollection ( object root, string value, TranslationContext translationContext ) : void
root object
value string
translationContext Simpl.Serialization.Context.TranslationContext
return void

AppendCollectionScalarValue() public method

public AppendCollectionScalarValue ( TextWriter textWriter, object obj, TranslationContext translationContext, System.Text.Format format ) : void
textWriter System.IO.TextWriter
obj object
translationContext Simpl.Serialization.Context.TranslationContext
format System.Text.Format
return void

AppendValue() public method

public AppendValue ( TextWriter textWriter, object obj, TranslationContext translationContext, System.Text.Format format ) : void
textWriter System.IO.TextWriter
obj object
translationContext Simpl.Serialization.Context.TranslationContext
format System.Text.Format
return void

AutomaticLazyGetCollectionOrMap() public method

public AutomaticLazyGetCollectionOrMap ( object root ) : Object
root object
return Object

ChildClassDescriptor() public method

public ChildClassDescriptor ( string currentTagName ) : ClassDescriptor
currentTagName string
return ClassDescriptor

Clone() public method

make a SHALLOW copy of this descriptor.
public Clone ( ) : FieldDescriptor
return FieldDescriptor

ContextSimplEquals() public method

Performs a value equality check on the values in LHS and RHS described by this field.
public ContextSimplEquals ( object leftContext, object rightContext ) : bool
leftContext object Left context object
rightContext object Right context object
return bool

FieldDescriptor() public method

public FieldDescriptor ( ClassDescriptor baseClassDescriptor ) : System
baseClassDescriptor ClassDescriptor
return System

FieldDescriptor() public method

public FieldDescriptor ( ClassDescriptor baseClassDescriptor, FieldDescriptor wrappedFD, String wrapperTag ) : System
baseClassDescriptor ClassDescriptor
wrappedFD FieldDescriptor
wrapperTag String
return System

FieldDescriptor() public method

public FieldDescriptor ( ClassDescriptor declaringClassDescriptor, FieldInfo field, int annotationType ) : System
declaringClassDescriptor ClassDescriptor
field System.Reflection.FieldInfo
annotationType int
return System

GetChildClassDescriptor() public method

public GetChildClassDescriptor ( int tlvType ) : ClassDescriptor
tlvType int
return ClassDescriptor

GetCollection() public method

public GetCollection ( Object context ) : ICollection
context Object
return ICollection

GetGenericTypeVars() public method

public GetGenericTypeVars ( ) : List
return List

GetGenericTypeVarsContext() public method

public GetGenericTypeVarsContext ( ) : List
return List

GetMapKeyFieldValue() public method

public GetMapKeyFieldValue ( Object mapElement ) : Object
mapElement Object
return Object

GetNested() public method

public GetNested ( object context ) : object
context object
return object

GetObject() public method

Obtains the value decribed by this FieldDescriptor, with the given object used as Context
public GetObject ( object contextObject ) : object
contextObject object The context object to obtain a field value for.
return object

GetValue() public method

public GetValue ( Object context ) : Object
context Object
return Object

GetValueString() public method

public GetValueString ( object context ) : string
context object
return string

IsCollectionTag() public method

public IsCollectionTag ( string currentTag ) : bool
currentTag string
return bool

IsDefaultValue() public method

public IsDefaultValue ( String value ) : bool
value String
return bool

IsDefaultValueFromContext() public method

public IsDefaultValueFromContext ( object context ) : bool
context object
return bool

MakeIgnoredFieldDescriptor() public static method

public static MakeIgnoredFieldDescriptor ( string currentTag ) : FieldDescriptor
currentTag string
return FieldDescriptor

ResolveUnresolvedClassesAnnotation() public method

public ResolveUnresolvedClassesAnnotation ( ) : System.Boolean
return System.Boolean

ResolveUnresolvedScopeAnnotation() public method

public ResolveUnresolvedScopeAnnotation ( ) : System.Boolean
return System.Boolean

SetElementClassDescriptor() public method

public SetElementClassDescriptor ( ClassDescriptor elementClassDescriptor ) : void
elementClassDescriptor ClassDescriptor
return void

SetFieldBaseClassGeneric() public method

public SetFieldBaseClassGeneric ( Type superClassGenericArguments ) : void
superClassGenericArguments System.Type
return void

SetFieldToComposite() public method

public SetFieldToComposite ( object root, object subRoot ) : void
root object
subRoot object
return void

SetFieldToScalar() public method

public SetFieldToScalar ( object root, string value, TranslationContext translationContext ) : void
root object
value string
translationContext Simpl.Serialization.Context.TranslationContext
return void

SetGenericTypeVars() public method

public SetGenericTypeVars ( List derivedGenericTypeVariables ) : void
derivedGenericTypeVariables List
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

IGNORED_ELEMENT_FIELD_DESCRIPTOR public_oe static_oe property

public static FieldDescriptor,Simpl.Serialization IGNORED_ELEMENT_FIELD_DESCRIPTOR
return FieldDescriptor

Null public_oe static_oe property

public static String Null
return String