C# 클래스 IronRuby.Builtins.RubyClass

상속: RubyModule, IDuplicable
파일 보기 프로젝트 열기: jschementi/iron 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddAsDependencyOf void
AddMethodsOverwriteExisting bool
BuildDelegateConstructorCall void
BuildOverriddenInitializerCall void
CacheFailure void
ClassInheritedEvent void
CreateDummySingleton RubyClass
Duplicate RubyClass
ForEachAncestor bool
GetAllocatorNewExpression System.Linq.Expressions.Expression
GetClrExtensionMethods IEnumerable
GetClrVectorFactories OverloadInfo[]
GetConstructor System.Reflection.ConstructorInfo
GetConstructors OverloadInfo[]
GetDeclaredClrMethods IEnumerable
GetDeclaredClrMethods System.Reflection.MemberInfo[]
GetDummySingletonClass RubyClass
GetSuperClass RubyClass
GetVisibleMethodCount int
IDuplicable object
InitializeDependencies void
InitializeDummySingleton void
InvalidateGroupsInSubClasses int
IsFailureCached bool
IsVisible bool
IsVisible bool
IsWriteable bool
MakeGroup IronRuby.Runtime.Calls.RubyMethodGroupInfo
MakeGroup IronRuby.Runtime.Calls.RubyOverloadGroupInfo
MarkNewException System.Linq.Expressions.Expression
MethodRemoved void
MethodUndefined void
MixinsUpdated void
PrepareExtensionMethodsUpdate void
PrepareMethodUpdate void
PrepareMethodUpdate void
ResolveMethodMissingForSite IronRuby.Runtime.Calls.RubyMemberInfo
ResolveOverriddenMethod IronRuby.Runtime.Calls.RubyMemberInfo
RubyClass System.Linq.Expressions
SetGlobalScope void
TryGetClrEvent bool
TryGetClrEvent bool
TryGetClrField bool
TryGetClrField bool
TryGetClrMember bool
TryGetClrMethod bool
TryGetClrProperty bool

공개 메소드들

메소드 설명
BuildAllocatorCall ( MetaObjectBuilder metaBuilder, CallArguments args, Func defaultExceptionMessage ) : bool
BuildClrObjectConstruction ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void

Implements Class#clr_new feature.

BuildObjectAllocation ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void

Implements Class#allocate feature.

BuildObjectConstruction ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void

Implements Class#new feature.

BuildObjectConstructionNoFlow ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void
CreateAnonymousClass ( IronRuby.Runtime.RubyScope scope, BlockParam body, RubyClass self, [ superClass ) : object
GetNonSingletonClass ( ) : RubyClass
GetUnderlyingSystemType ( ) : Type
InitializeClassCopy ( RubyClass rubyClass ) : void
IsException ( ) : bool
IsSubclassOf ( RubyClass super ) : bool

Returns true if this class is equal to super or it is its descendant.

MethodAdded ( string name ) : void
RubyClass ( RubyClass rubyClass ) : System.Linq.Expressions
TryGetClrConstructor ( IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
TryGetClrMember ( string name, Type asType, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool

보호된 메소드들

메소드 설명
EnumerateClrMembers ( Type type ) : IEnumerable
TryGetClrMember ( Type type, string name, bool mapNames, bool unmangleNames, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool

비공개 메소드들

메소드 설명
AddAsDependencyOf ( IList modules ) : void
AddMethodsOverwriteExisting ( Dictionary &methods, IEnumerable newOverloads, IronRuby.Runtime.Calls.RubyOverloadGroupInfo overloadOwners, bool specialNameOnly ) : bool
BuildDelegateConstructorCall ( MetaObjectBuilder metaBuilder, CallArguments args, Type type ) : void
BuildOverriddenInitializerCall ( MetaObjectBuilder metaBuilder, CallArguments args, IronRuby.Runtime.Calls.RubyMemberInfo initializer ) : void
CacheFailure ( Type type, string methodName, bool isStatic, int extensionVersion ) : void
ClassInheritedEvent ( RubyClass subClass ) : void
CreateDummySingleton ( ) : RubyClass
Duplicate ( object singletonClassOf ) : RubyClass

Duplicates this class object. When duplicating singleton class a new "singletonClassOf" reference needs to be provided. NOT thread safe.

ForEachAncestor ( bool>.Func action ) : bool
GetAllocatorNewExpression ( CallArguments args, Func defaultExceptionMessage ) : Expression
GetClrExtensionMethods ( Type type, string name ) : IEnumerable
GetClrVectorFactories ( ) : OverloadInfo[]
GetConstructor ( Type type ) : ConstructorInfo
GetConstructors ( Type type ) : OverloadInfo[]
GetDeclaredClrMethods ( Type type, BindingFlags bindingFlags, string prefix, string name, string altName, bool specialNameOnly ) : IEnumerable
GetDeclaredClrMethods ( Type type, BindingFlags bindingFlags, string name ) : System.Reflection.MemberInfo[]
GetDummySingletonClass ( ) : RubyClass
GetSuperClass ( ) : RubyClass
GetVisibleMethodCount ( IEnumerable members, bool specialNameOnly ) : int
IDuplicable ( RubyContext context, bool copySingletonMembers ) : object
InitializeDependencies ( ) : void
InitializeDummySingleton ( ) : void
InvalidateGroupsInSubClasses ( string methodName, int maxLevel ) : int
IsFailureCached ( Type type, string methodName, bool isStatic, int extensionVersion ) : bool
IsVisible ( FieldInfo field ) : bool
IsVisible ( MethodAttributes attributes, Type declaringType, bool specialNameOnly ) : bool
IsWriteable ( FieldInfo field ) : bool
MakeGroup ( IEnumerable members, int visibleMemberCount, bool specialNameOnly, bool isDetached ) : RubyMethodGroupInfo
MakeGroup ( ICollection allMethods ) : IronRuby.Runtime.Calls.RubyOverloadGroupInfo
MarkNewException ( Expression expression ) : Expression
MethodRemoved ( string name ) : void
MethodUndefined ( string name ) : void
MixinsUpdated ( RubyModule oldMixins, RubyModule newMixins ) : void
PrepareExtensionMethodsUpdate ( List extensions ) : void

Invalidates - failure cache on RubyClass via incrementing extension version - groups - call sites via incrementing method version

PrepareMethodUpdate ( string methodName, IronRuby.Runtime.Calls.RubyMemberInfo method ) : void
PrepareMethodUpdate ( string methodName, IronRuby.Runtime.Calls.RubyMemberInfo method, int mixinsToSkip ) : void
ResolveMethodMissingForSite ( string name, RubyMethodVisibility incompatibleVisibility ) : IronRuby.Runtime.Calls.RubyMemberInfo
ResolveOverriddenMethod ( string name, int modulesToSkip ) : IronRuby.Runtime.Calls.RubyMemberInfo
RubyClass ( RubyContext context, string name, Type type, object singletonClassOf, Action methodsInitializer, Action constantsInitializer, Delegate factories, RubyClass superClass, RubyModule expandedMixins, TypeTracker tracker, RubyStruct structInfo, bool isRubyClass, bool isSingletonClass, ModuleRestrictions restrictions ) : System.Linq.Expressions
SetGlobalScope ( RubyGlobalScope value ) : void
TryGetClrEvent ( Type type, BindingFlags bindingFlags, string name, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
TryGetClrEvent ( Type type, BindingFlags bindingFlags, string name, string altName, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
TryGetClrField ( Type type, BindingFlags bindingFlags, bool isWrite, string name, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
TryGetClrField ( Type type, BindingFlags bindingFlags, bool isWrite, string name, string altName, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
TryGetClrMember ( Type type, string name, bool mapNames, bool unmangleNames, BindingFlags basicBindingFlags, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool

Returns a fresh instance of RubyMemberInfo each time it is called. The caller needs to cache it if appropriate. May add or use method groups to/from super-clases if BindingFlags.DeclaredOnly is used.

TryGetClrMethod ( Type type, BindingFlags bindingFlags, bool specialNameOnly, string name, string clrNamePrefix, string clrName, string altClrName, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool

There are basically 4 cases: 1) CLR method of the given name is not defined in the specified type. Do nothing, the method will be found as we traverse the hierarhy towards the Kernel module. 2) Otherwise 1) There is no RubyMemberInfo of given name present in the (type..Kernel] ancestors. We need to search all types in (type..Object] for CLR method overloads. 2) There is a RubyMemberInfo in a class, say C, in (type..Kernel]. We need to get CLR methods from (type..C) in addition to the members in the type. 1) C.HidesInheritedOverloads == true All overloads of the method we look for are in [type..C). 2) C.HidesInheritedOverloads == false All overloads of the method we look for are in [type..C) and in the RubyMemberInfo.

Doesn't include explicitly implemented interface methods. Including them would allow to call them directly (obj.foo) if the overload resolution succeeds. However, the interface methods are probably implemented explicitly for a reason: 1) There is a conflict in signatures -> the overload resolution would probably fail. 2) The class was designed with an intention to not expose the implementations directly.

TryGetClrProperty ( Type type, BindingFlags bindingFlags, bool isWrite, string name, string clrName, string altClrName, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool

메소드 상세

BuildAllocatorCall() 공개 메소드

public BuildAllocatorCall ( MetaObjectBuilder metaBuilder, CallArguments args, Func defaultExceptionMessage ) : bool
metaBuilder IronRuby.Runtime.Calls.MetaObjectBuilder
args IronRuby.Runtime.Calls.CallArguments
defaultExceptionMessage Func
리턴 bool

BuildClrObjectConstruction() 공개 메소드

Implements Class#clr_new feature.
public BuildClrObjectConstruction ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void
metaBuilder IronRuby.Runtime.Calls.MetaObjectBuilder
args IronRuby.Runtime.Calls.CallArguments
methodName string
리턴 void

BuildObjectAllocation() 공개 메소드

Implements Class#allocate feature.
public BuildObjectAllocation ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void
metaBuilder IronRuby.Runtime.Calls.MetaObjectBuilder
args IronRuby.Runtime.Calls.CallArguments
methodName string
리턴 void

BuildObjectConstruction() 공개 메소드

Implements Class#new feature.
public BuildObjectConstruction ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void
metaBuilder IronRuby.Runtime.Calls.MetaObjectBuilder
args IronRuby.Runtime.Calls.CallArguments
methodName string
리턴 void

BuildObjectConstructionNoFlow() 공개 메소드

public BuildObjectConstructionNoFlow ( MetaObjectBuilder metaBuilder, CallArguments args, string methodName ) : void
metaBuilder IronRuby.Runtime.Calls.MetaObjectBuilder
args IronRuby.Runtime.Calls.CallArguments
methodName string
리턴 void

CreateAnonymousClass() 공개 정적인 메소드

public static CreateAnonymousClass ( IronRuby.Runtime.RubyScope scope, BlockParam body, RubyClass self, [ superClass ) : object
scope IronRuby.Runtime.RubyScope
body IronRuby.Runtime.BlockParam
self RubyClass
superClass [
리턴 object

EnumerateClrMembers() 보호된 메소드

protected EnumerateClrMembers ( Type type ) : IEnumerable
type System.Type
리턴 IEnumerable

GetNonSingletonClass() 공개 메소드

public GetNonSingletonClass ( ) : RubyClass
리턴 RubyClass

GetUnderlyingSystemType() 공개 메소드

public GetUnderlyingSystemType ( ) : Type
리턴 System.Type

InitializeClassCopy() 공개 메소드

public InitializeClassCopy ( RubyClass rubyClass ) : void
rubyClass RubyClass
리턴 void

IsException() 공개 메소드

public IsException ( ) : bool
리턴 bool

IsSubclassOf() 공개 메소드

Returns true if this class is equal to super or it is its descendant.
public IsSubclassOf ( RubyClass super ) : bool
super RubyClass
리턴 bool

MethodAdded() 공개 메소드

public MethodAdded ( string name ) : void
name string
리턴 void

RubyClass() 공개 메소드

public RubyClass ( RubyClass rubyClass ) : System.Linq.Expressions
rubyClass RubyClass
리턴 System.Linq.Expressions

TryGetClrConstructor() 공개 메소드

public TryGetClrConstructor ( IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
method IronRuby.Runtime.Calls.RubyMemberInfo
리턴 bool

TryGetClrMember() 보호된 메소드

protected TryGetClrMember ( Type type, string name, bool mapNames, bool unmangleNames, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
type System.Type
name string
mapNames bool
unmangleNames bool
method IronRuby.Runtime.Calls.RubyMemberInfo
리턴 bool

TryGetClrMember() 공개 메소드

public TryGetClrMember ( string name, Type asType, IronRuby.Runtime.Calls.RubyMemberInfo &method ) : bool
name string
asType System.Type
method IronRuby.Runtime.Calls.RubyMemberInfo
리턴 bool