C# Class Mono.CSharp.TypeContainer

Inheritance: MemberCore
Show file Open project: kumpera/mono Class Usage Examples

Public Properties

Property Type Description
DynamicSitesCounter int
Kind MemberKind

Protected Properties

Property Type Description
base_type TypeSpec
base_type_expr TypeExpr
compiler_generated List
constants List
default_constructor Constructor
default_static_constructor Constructor
events List
fields List
iface_exprs TypeExpr[]
initialized_fields List
initialized_static_fields List
instance_constructors List
requires_delayed_unmanagedtype_check bool
spec TypeSpec
type_bases List
types List

Private Properties

Property Type Description
AddMemberToList void
CheckRecursiveDefinition System.TypeSpec
CreateTypeBuilder bool
DefineBaseTypes bool
GenerateDocComment void
GetNormalPartialBases TypeExpr[]
ITypeDefinition bool
LookupNestedTypeInHierarchy TypeSpec

Public Methods

Method Description
AddBasesForPart ( DeclSpace part, List bases ) : void
AddCompilerGeneratedClass ( CompilerGeneratedClass c ) : void
AddConstant ( Mono.CSharp.Const constant ) : void
AddConstructor ( Constructor c ) : void
AddDelegate ( Delegate d ) : System.TypeSpec
AddEvent ( Event e ) : void
AddField ( FieldBase field ) : bool
AddIndexer ( Indexer i ) : void

Indexer has special handling in constrast to other AddXXX because the name can be driven by IndexerNameAttribute

AddMember ( MemberCore symbol ) : bool
AddMember ( MemberCore symbol, string name ) : bool
AddMethod ( MethodOrOperator method ) : void
AddOperator ( Operator op ) : void
AddPartial ( TypeContainer next_part ) : TypeContainer
AddProperty ( Property prop ) : void
AddTypeContainer ( TypeContainer tc ) : TypeContainer
ApplyAttributeBuilder ( Attribute a, MethodSpec ctor, byte cdata, Mono.CSharp.PredefinedAttributes pa ) : void
CheckMemberUsage ( List al, string member_type ) : void
CheckPairedOperators ( ) : void
CloseType ( ) : void
CreateHoistedBaseCallProxy ( ResolveContext rc, MethodSpec method ) : MethodSpec
CreateType ( ) : bool
Define ( ) : bool

Populates our TypeBuilder with fields and methods

DefineConstants ( ) : void
DefineType ( ) : void
DoResolveFieldInitializers ( BlockContext ec ) : void
Emit ( ) : void
EmitConstructors ( ) : void
EmitIndexerName ( ) : void
EmitType ( ) : void

Emits the code, this step is performed after all the types, enumerations, constructors

GetAttributeCoClass ( ) : TypeSpec
GetAttributeDefaultMember ( ) : string
GetAttributeUsage ( PredefinedAttribute pa ) : AttributeUsageAttribute
IsBaseTypeDefinition ( TypeSpec baseType ) : bool
LoadMembers ( TypeSpec declaringType, bool onlyTypes, MemberCache &cache ) : void
LookupNamespaceOrType ( string name, int arity, Location loc, bool ignore_cs0104 ) : FullNamedExpression
Mark_HasEquals ( ) : void
Mark_HasGetHashCode ( ) : void
MethodModifiersValid ( MemberCore mc ) : bool
RegisterFieldForInitialization ( MemberCore field, FieldInitializer expression ) : void
RemoveTypeContainer ( TypeContainer next_part ) : void
ResolveFieldInitializers ( BlockContext ec ) : void
ResolveTypeParameters ( ) : bool
SetParameterInfo ( List constraints_list ) : void
SetPredefinedSpec ( BuildinTypeSpec spec ) : void
TypeContainer ( NamespaceEntry ns, DeclSpace parent, MemberName name, Attributes attrs, MemberKind kind ) : System
UpdateTypeParameterConstraints ( TypeContainer part ) : void
VerifyImplements ( InterfaceMemberBase mb ) : bool

Performs checks for an explicit interface implementation. First it checks whether the `interface_type' is a base inteface implementation. Then it checks whether `name' exists in the interface type.

VerifyMembers ( ) : void

Protected Methods

Method Description
AddMemberType ( TypeContainer ds ) : bool
AddPartial ( TypeContainer next_part, string name ) : TypeContainer
CheckEqualsAndGetHashCode ( ) : void
ComputeIndexerName ( ) : void
DefineContainerMembers ( System mcal ) : void
DefineNestedTypes ( ) : bool
DoDefineMembers ( ) : bool
DoResolveTypeParameters ( ) : bool
RemoveMemberType ( DeclSpace ds ) : void
ResolveBaseTypes ( TypeExpr &base_class ) : TypeExpr[]

This function computes the Base class and also the list of interfaces that the class or struct @c implements. The return value is an array (might be null) of interfaces implemented (as Types). The @base_class argument is set to the base object or null if this is `System.Object'.

VerifyClsCompliance ( ) : bool

Private Methods

Method Description
AddMemberToList ( MemberCore mc, List alist, bool isexplicit ) : void
CheckRecursiveDefinition ( TypeContainer tc ) : System.TypeSpec
CreateTypeBuilder ( ) : bool
DefineBaseTypes ( ) : bool
GenerateDocComment ( DeclSpace ds ) : void
GetNormalPartialBases ( ) : TypeExpr[]
ITypeDefinition ( IAssemblyDefinition assembly ) : bool
LookupNestedTypeInHierarchy ( string name, int arity ) : TypeSpec

Method Details

AddBasesForPart() public method

public AddBasesForPart ( DeclSpace part, List bases ) : void
part DeclSpace
bases List
return void

AddCompilerGeneratedClass() public method

public AddCompilerGeneratedClass ( CompilerGeneratedClass c ) : void
c CompilerGeneratedClass
return void

AddConstant() public method

public AddConstant ( Mono.CSharp.Const constant ) : void
constant Mono.CSharp.Const
return void

AddConstructor() public method

public AddConstructor ( Constructor c ) : void
c Constructor
return void

AddDelegate() public method

public AddDelegate ( Delegate d ) : System.TypeSpec
d Delegate
return System.TypeSpec

AddEvent() public method

public AddEvent ( Event e ) : void
e Event
return void

AddField() public method

public AddField ( FieldBase field ) : bool
field FieldBase
return bool

AddIndexer() public method

Indexer has special handling in constrast to other AddXXX because the name can be driven by IndexerNameAttribute
public AddIndexer ( Indexer i ) : void
i Indexer
return void

AddMember() public method

public AddMember ( MemberCore symbol ) : bool
symbol MemberCore
return bool

AddMember() public method

public AddMember ( MemberCore symbol, string name ) : bool
symbol MemberCore
name string
return bool

AddMemberType() protected method

protected AddMemberType ( TypeContainer ds ) : bool
ds TypeContainer
return bool

AddMethod() public method

public AddMethod ( MethodOrOperator method ) : void
method MethodOrOperator
return void

AddOperator() public method

public AddOperator ( Operator op ) : void
op Operator
return void

AddPartial() public method

public AddPartial ( TypeContainer next_part ) : TypeContainer
next_part TypeContainer
return TypeContainer

AddPartial() protected method

protected AddPartial ( TypeContainer next_part, string name ) : TypeContainer
next_part TypeContainer
name string
return TypeContainer

AddProperty() public method

public AddProperty ( Property prop ) : void
prop Property
return void

AddTypeContainer() public method

public AddTypeContainer ( TypeContainer tc ) : TypeContainer
tc TypeContainer
return TypeContainer

ApplyAttributeBuilder() public method

public ApplyAttributeBuilder ( Attribute a, MethodSpec ctor, byte cdata, Mono.CSharp.PredefinedAttributes pa ) : void
a Attribute
ctor MethodSpec
cdata byte
pa Mono.CSharp.PredefinedAttributes
return void

CheckEqualsAndGetHashCode() protected method

protected CheckEqualsAndGetHashCode ( ) : void
return void

CheckMemberUsage() public method

public CheckMemberUsage ( List al, string member_type ) : void
al List
member_type string
return void

CheckPairedOperators() public method

public CheckPairedOperators ( ) : void
return void

CloseType() public method

public CloseType ( ) : void
return void

ComputeIndexerName() protected method

protected ComputeIndexerName ( ) : void
return void

CreateHoistedBaseCallProxy() public method

public CreateHoistedBaseCallProxy ( ResolveContext rc, MethodSpec method ) : MethodSpec
rc ResolveContext
method MethodSpec
return MethodSpec

CreateType() public method

public CreateType ( ) : bool
return bool

Define() public final method

Populates our TypeBuilder with fields and methods
public final Define ( ) : bool
return bool

DefineConstants() public method

public DefineConstants ( ) : void
return void

DefineContainerMembers() protected method

protected DefineContainerMembers ( System mcal ) : void
mcal System
return void

DefineNestedTypes() protected method

protected DefineNestedTypes ( ) : bool
return bool

DefineType() public method

public DefineType ( ) : void
return void

DoDefineMembers() protected method

protected DoDefineMembers ( ) : bool
return bool

DoResolveFieldInitializers() public method

public DoResolveFieldInitializers ( BlockContext ec ) : void
ec BlockContext
return void

DoResolveTypeParameters() protected method

protected DoResolveTypeParameters ( ) : bool
return bool

Emit() public method

public Emit ( ) : void
return void

EmitConstructors() public method

public EmitConstructors ( ) : void
return void

EmitIndexerName() public method

public EmitIndexerName ( ) : void
return void

EmitType() public method

Emits the code, this step is performed after all the types, enumerations, constructors
public EmitType ( ) : void
return void

GetAttributeCoClass() public method

public GetAttributeCoClass ( ) : TypeSpec
return TypeSpec

GetAttributeDefaultMember() public method

public GetAttributeDefaultMember ( ) : string
return string

GetAttributeUsage() public method

public GetAttributeUsage ( PredefinedAttribute pa ) : AttributeUsageAttribute
pa PredefinedAttribute
return AttributeUsageAttribute

IsBaseTypeDefinition() public method

public IsBaseTypeDefinition ( TypeSpec baseType ) : bool
baseType TypeSpec
return bool

LoadMembers() public method

public LoadMembers ( TypeSpec declaringType, bool onlyTypes, MemberCache &cache ) : void
declaringType TypeSpec
onlyTypes bool
cache MemberCache
return void

LookupNamespaceOrType() public method

public LookupNamespaceOrType ( string name, int arity, Location loc, bool ignore_cs0104 ) : FullNamedExpression
name string
arity int
loc Location
ignore_cs0104 bool
return FullNamedExpression

Mark_HasEquals() public method

public Mark_HasEquals ( ) : void
return void

Mark_HasGetHashCode() public method

public Mark_HasGetHashCode ( ) : void
return void

MethodModifiersValid() public method

public MethodModifiersValid ( MemberCore mc ) : bool
mc MemberCore
return bool

RegisterFieldForInitialization() public method

public RegisterFieldForInitialization ( MemberCore field, FieldInitializer expression ) : void
field MemberCore
expression FieldInitializer
return void

RemoveMemberType() protected method

protected RemoveMemberType ( DeclSpace ds ) : void
ds DeclSpace
return void

RemoveTypeContainer() public method

public RemoveTypeContainer ( TypeContainer next_part ) : void
next_part TypeContainer
return void

ResolveBaseTypes() protected method

This function computes the Base class and also the list of interfaces that the class or struct @c implements. The return value is an array (might be null) of interfaces implemented (as Types). The @base_class argument is set to the base object or null if this is `System.Object'.
protected ResolveBaseTypes ( TypeExpr &base_class ) : TypeExpr[]
base_class TypeExpr
return TypeExpr[]

ResolveFieldInitializers() public method

public ResolveFieldInitializers ( BlockContext ec ) : void
ec BlockContext
return void

ResolveTypeParameters() public method

public ResolveTypeParameters ( ) : bool
return bool

SetParameterInfo() public method

public SetParameterInfo ( List constraints_list ) : void
constraints_list List
return void

SetPredefinedSpec() public method

public SetPredefinedSpec ( BuildinTypeSpec spec ) : void
spec BuildinTypeSpec
return void

TypeContainer() public method

public TypeContainer ( NamespaceEntry ns, DeclSpace parent, MemberName name, Attributes attrs, MemberKind kind ) : System
ns NamespaceEntry
parent DeclSpace
name MemberName
attrs Attributes
kind MemberKind
return System

UpdateTypeParameterConstraints() public method

public UpdateTypeParameterConstraints ( TypeContainer part ) : void
part TypeContainer
return void

VerifyClsCompliance() protected method

protected VerifyClsCompliance ( ) : bool
return bool

VerifyImplements() public method

Performs checks for an explicit interface implementation. First it checks whether the `interface_type' is a base inteface implementation. Then it checks whether `name' exists in the interface type.
public VerifyImplements ( InterfaceMemberBase mb ) : bool
mb InterfaceMemberBase
return bool

VerifyMembers() public method

public VerifyMembers ( ) : void
return void

Property Details

DynamicSitesCounter public property

public int DynamicSitesCounter
return int

Kind public property

public MemberKind Kind
return MemberKind

base_type protected property

protected TypeSpec base_type
return TypeSpec

base_type_expr protected property

protected TypeExpr base_type_expr
return TypeExpr

compiler_generated protected property

protected List compiler_generated
return List

constants protected property

protected List constants
return List

default_constructor protected property

protected Constructor default_constructor
return Constructor

default_static_constructor protected property

protected Constructor default_static_constructor
return Constructor

events protected property

protected List events
return List

fields protected property

protected List fields
return List

iface_exprs protected property

protected TypeExpr[] iface_exprs
return TypeExpr[]

initialized_fields protected property

protected List initialized_fields
return List

initialized_static_fields protected property

protected List initialized_static_fields
return List

instance_constructors protected property

protected List instance_constructors
return List

requires_delayed_unmanagedtype_check protected property

protected bool requires_delayed_unmanagedtype_check
return bool

spec protected property

protected TypeSpec spec
return TypeSpec

type_bases protected property

protected List type_bases
return List

types protected property

protected List types
return List