Esempio n. 1
0
        private static ClassLoader GetClassLoader(Class type)
        {
            ReflectUtil.checkPackageAccess(type);
            ClassLoader loader = type.ClassLoader;

            if (loader == null)
            {
                loader = Thread.CurrentThread.ContextClassLoader;                 // avoid use of BCP
                if (loader == null)
                {
                    loader = ClassLoader.SystemClassLoader;
                }
            }
            return(loader);
        }