C# 클래스 Jurassic.Compiler.ReflectionHelpers

Used by the code generator. Not intended for user code (the class needs to be public because when using Reflection Emit, all calls into Jurassic.dll are cross-assembly and thus must be public).
파일 보기 프로젝트 열기: paulbartrum/jurassic 1 사용 예제들

공개 메소드들

메소드 설명
GetConstructor ( Type type ) : ConstructorInfo

Gets the ConstructorInfo for a constructor. Throws an exception if the search fails.

GetField ( Type type, string name ) : FieldInfo

Gets the FieldInfo for a field. Throws an exception if the search fails.

GetInstanceMethod ( Type type, string name ) : MethodInfo

Gets the MethodInfo for an instance method. Throws an exception if the search fails.

GetStaticMethod ( Type type, string name ) : MethodInfo

Gets the MethodInfo for a static method. Throws an exception if the search fails.

SetObjectLiteralGetter ( ObjectInstance obj, object key, Jurassic.Library.UserDefinedFunction getter ) : void

Sets the value of a object literal property to a getter. If the value already has a setter then it will be retained.

SetObjectLiteralSetter ( ObjectInstance obj, object key, Jurassic.Library.UserDefinedFunction setter ) : void

Sets the value of a object literal property to a setter. If the value already has a getter then it will be retained.

SetObjectLiteralValue ( ObjectInstance obj, object key, object value ) : void

Sets the value of a object literal property to a value.

비공개 메소드들

메소드 설명
GetGenericInstanceMethod ( Type type, string name ) : MethodInfo

Gets the MethodInfo for a generic instance method. Throws an exception if the search fails.

GetMembers ( ) : IEnumerable

Gets an enumerable list of all the MemberInfos that are statically known to be used by this DLL.

ReflectionHelpers ( ) : System

Initializes static members of this class.

메소드 상세

GetConstructor() 공개 정적인 메소드

Gets the ConstructorInfo for a constructor. Throws an exception if the search fails.
public static GetConstructor ( Type type ) : ConstructorInfo
type System.Type The type to search.
리턴 System.Reflection.ConstructorInfo

GetField() 공개 정적인 메소드

Gets the FieldInfo for a field. Throws an exception if the search fails.
public static GetField ( Type type, string name ) : FieldInfo
type System.Type The type to search.
name string The name of the field.
리턴 System.Reflection.FieldInfo

GetInstanceMethod() 공개 정적인 메소드

Gets the MethodInfo for an instance method. Throws an exception if the search fails.
public static GetInstanceMethod ( Type type, string name ) : MethodInfo
type System.Type The type to search.
name string The name of the method to search for.
리턴 System.Reflection.MethodInfo

GetStaticMethod() 공개 정적인 메소드

Gets the MethodInfo for a static method. Throws an exception if the search fails.
public static GetStaticMethod ( Type type, string name ) : MethodInfo
type System.Type The type to search.
name string The name of the method to search for.
리턴 System.Reflection.MethodInfo

SetObjectLiteralGetter() 공개 정적인 메소드

Sets the value of a object literal property to a getter. If the value already has a setter then it will be retained.
public static SetObjectLiteralGetter ( ObjectInstance obj, object key, Jurassic.Library.UserDefinedFunction getter ) : void
obj Jurassic.Library.ObjectInstance The object to set the property on.
key object The property key (can be a string or a symbol).
getter Jurassic.Library.UserDefinedFunction The getter function.
리턴 void

SetObjectLiteralSetter() 공개 정적인 메소드

Sets the value of a object literal property to a setter. If the value already has a getter then it will be retained.
public static SetObjectLiteralSetter ( ObjectInstance obj, object key, Jurassic.Library.UserDefinedFunction setter ) : void
obj Jurassic.Library.ObjectInstance The object to set the property on.
key object The property key (can be a string or a symbol).
setter Jurassic.Library.UserDefinedFunction The setter function.
리턴 void

SetObjectLiteralValue() 공개 정적인 메소드

Sets the value of a object literal property to a value.
public static SetObjectLiteralValue ( ObjectInstance obj, object key, object value ) : void
obj Jurassic.Library.ObjectInstance The object to set the property on.
key object The property key (can be a string or a symbol).
value object The value to set.
리턴 void