C# Class clojure.lang.Reflector

显示文件 Open project: richhickey/clojure-clr Class Usage Examples

Public Methods

Method Description
BoxArgs ( ParameterInfo pinfos, object args ) : object[]
CallInstanceMethod ( string methodName, IList typeArgs, object target ) : object
CallMethod ( string methodName, IList typeArgs, bool isStatic, Type t, object target ) : object
CallStaticMethod ( string methodName, IList typeArgs, Type t ) : object
GetArityZeroMethod ( Type t, string name, bool getStatics ) : MethodInfo
GetField ( Type t, String name, bool getStatics ) : FieldInfo
GetInstanceFieldOrProperty ( object target, string fieldName ) : object
GetMatchingMethod ( IPersistentMap spanMap, clojure.lang.CljCompiler.Ast.Expr target, IList args, string methodName, IList typeArgs ) : MethodInfo

Parse-time lookup of instance method

GetMatchingMethod ( IPersistentMap spanMap, Type targetType, IList args, string methodName, IList typeArgs ) : MethodInfo

Parse-time lookup of static method

GetProperty ( Type t, String name, bool getStatics ) : PropertyInfo
InvokeConstructor ( Type t, object args ) : object
InvokeStaticMethod ( String typeName, String methodName, Object args ) : Object
InvokeStaticMethod ( Type t, String methodName, Object args ) : Object
SetInstanceFieldOrProperty ( object target, string fieldName, object val ) : object

Private Methods

Method Description
AreAssignable ( Type dest, Type src ) : bool
AreReferenceAssignable ( Type dest, Type src ) : bool
BoxArg ( ParameterInfo pinfo, object arg ) : object
ExpandArrayTypename ( Type t ) : string
ExprsTypes ( IList args ) : List
GetConstructors ( Type targetType, int arity ) : IList
GetInterfaceMethods ( Type targetType, string methodName, IList typeArgs, int arity ) : List
GetMatchingConstructor ( IPersistentMap spanMap, Type targetType, IList args, int &ctorCount ) : ConstructorInfo

Get constructor matching args for type.

GetMatchingMethodAux ( Type targetType, IList args, IList methods, string methodName, bool isStatic ) : MethodBase

Select matching method from list based on args.

GetMatchingMethodAux ( Type targetType, object actualArgs, IList methods, string methodName, bool isStatic ) : MethodBase
GetMethods ( Type targetType, string methodName, IList typeArgs, int arity, bool getStatics ) : IList

Get methods of fixed name and arity.

InvokeMatchingMethod ( string methodName, IList infos, Type t, object target, object args ) : object
InvokeMethod ( MethodInfo info, object target, object args ) : object
IsCongruent ( ParameterInfo pinfos, object args ) : bool
MaybeReflectionWarn ( IPersistentMap spanMap, MethodBase method, string methodName, IList args ) : void
ParamArgTypeMatch ( Type paramType, Type argType ) : bool
SignatureString ( List classes ) : string
Subsumes ( ParameterInfo c1, ParameterInfo c2 ) : bool
prepRet ( Type t, Object x ) : Object

Method Details

BoxArgs() public static method

public static BoxArgs ( ParameterInfo pinfos, object args ) : object[]
pinfos System.Reflection.ParameterInfo
args object
return object[]

CallInstanceMethod() public static method

public static CallInstanceMethod ( string methodName, IList typeArgs, object target ) : object
methodName string
typeArgs IList
target object
return object

CallMethod() public static method

public static CallMethod ( string methodName, IList typeArgs, bool isStatic, Type t, object target ) : object
methodName string
typeArgs IList
isStatic bool
t System.Type
target object
return object

CallStaticMethod() public static method

public static CallStaticMethod ( string methodName, IList typeArgs, Type t ) : object
methodName string
typeArgs IList
t System.Type
return object

GetArityZeroMethod() public static method

public static GetArityZeroMethod ( Type t, string name, bool getStatics ) : MethodInfo
t System.Type
name string
getStatics bool
return System.Reflection.MethodInfo

GetField() public static method

public static GetField ( Type t, String name, bool getStatics ) : FieldInfo
t System.Type
name String
getStatics bool
return System.Reflection.FieldInfo

GetInstanceFieldOrProperty() public static method

public static GetInstanceFieldOrProperty ( object target, string fieldName ) : object
target object
fieldName string
return object

GetMatchingMethod() public static method

Parse-time lookup of instance method
public static GetMatchingMethod ( IPersistentMap spanMap, clojure.lang.CljCompiler.Ast.Expr target, IList args, string methodName, IList typeArgs ) : MethodInfo
spanMap IPersistentMap
target clojure.lang.CljCompiler.Ast.Expr
args IList
methodName string
typeArgs IList
return System.Reflection.MethodInfo

GetMatchingMethod() public static method

Parse-time lookup of static method
public static GetMatchingMethod ( IPersistentMap spanMap, Type targetType, IList args, string methodName, IList typeArgs ) : MethodInfo
spanMap IPersistentMap
targetType System.Type
args IList
methodName string
typeArgs IList
return System.Reflection.MethodInfo

GetProperty() public static method

public static GetProperty ( Type t, String name, bool getStatics ) : PropertyInfo
t System.Type
name String
getStatics bool
return System.Reflection.PropertyInfo

InvokeConstructor() public static method

public static InvokeConstructor ( Type t, object args ) : object
t System.Type
args object
return object

InvokeStaticMethod() public static method

public static InvokeStaticMethod ( String typeName, String methodName, Object args ) : Object
typeName String
methodName String
args Object
return Object

InvokeStaticMethod() public static method

public static InvokeStaticMethod ( Type t, String methodName, Object args ) : Object
t System.Type
methodName String
args Object
return Object

SetInstanceFieldOrProperty() public static method

public static SetInstanceFieldOrProperty ( object target, string fieldName, object val ) : object
target object
fieldName string
val object
return object