GetField() public method

public GetField ( string name ) : IKVM.Reflection.FieldInfo
name string
return IKVM.Reflection.FieldInfo
コード例 #1
0
ファイル: RuntimeHelperTypes.cs プロジェクト: moayyaed/ikvm
        internal static FieldInfo GetClassLiteralField(Type type)
        {
            Debug.Assert(type != Types.Void);
            if (classLiteralType == null)
            {
#if STATIC_COMPILER
                classLiteralType = JVM.CoreAssembly.GetType("ikvm.internal.ClassLiteral`1");
#elif !FIRST_PASS
                classLiteralType = typeof([email protected] <>);
#endif
            }
#if !STATIC_COMPILER
            if (!IsTypeBuilder(type))
            {
                return(classLiteralType.MakeGenericType(type).GetField("Value", BindingFlags.Public | BindingFlags.Static));
            }
#endif
            if (classLiteralField == null)
            {
                classLiteralField = classLiteralType.GetField("Value", BindingFlags.Public | BindingFlags.Static);
            }
            return(TypeBuilder.GetField(classLiteralType.MakeGenericType(type), classLiteralField));
        }