Get the loader provided by this {@link Application}

@param context the current context
@return an {@link ImageLoader}
488374
public static ImageLoader getLoader(Context context) {
        ImageLoader loader = (ImageLoader) context.getApplicationContext().getSystemService(IMAGE_LOADER_SERVICE);
        if (loader == null) {
            throw new IllegalStateException("ImageLoaderApplication not set as application class in" +
                    "AndroidManifest.xml");
        } else {
            return loader;
        }
    }
444904
public static ClassLoader getDefaultClassLoader(Class<?> clazz) {
		ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
		if (classLoader == null) {
			classLoader = clazz.getClassLoader();
		}
		return classLoader;
	}
952226
public static ClassLoader getClassLoader(final Class<?> clazz) {
        // Context class loader can be null
        final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
        if (contextClassLoader != null) {
            return contextClassLoader;
        }
        if (clazz != null) {
            // The class loader for a specific class can also be null
            final ClassLoader clazzClassLoader = clazz.getClassLoader();
            if (clazzClassLoader != null) {
                return clazzClassLoader;
            }
        }
        // The only class loader we can rely on for not being null is the system
        // one
        return ClassLoader.getSystemClassLoader();
    }
1172274
public static <X> ServiceTypeLoader<X> load(Class<X> serviceType) {
        return load(serviceType, Thread.currentThread().getContextClassLoader());
    }
934777
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
    public static StorageManager getStorageManager(Context context) {
        return (StorageManager) context.getSystemService(Context.STORAGE_SERVICE);
    }
668261
public static ClassLoader getClassLoader(Class<?> clazz) {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        if (loader != null) {
            return loader;
        }
        if (clazz != null) {
            loader = clazz.getClassLoader();
            if (loader != null) {
                return loader;
            }
        }
        return ClassLoader.getSystemClassLoader();
    }
1091635
public static ImageLoader getInstance() {
		if (instance == null) {
			synchronized (ImageLoader.class) {
				if (instance == null) {
					instance = new ImageLoader();
				}
			}
		}
		return instance;
	}
1297439
public static ClassLoader getClassLoader() {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null) {
            cl = ClassLoader.getSystemClassLoader();
            if (cl == null) {
                // When this method is called for initializing a ICU4J class
                // during bootstrap, cl might be still null (other than Android?).
                // In this case, we want to use the bootstrap class loader.
                cl = getBootstrapClassLoader();
            }
        }
        return cl;
    }
517271
public static ContextLoaderListener createSpringContextLoader(final WebApplicationContext webApplicationContext) {
        return new ContextLoaderListener() {
            @SuppressWarnings("unchecked")
            @Override
            protected WebApplicationContext createWebApplicationContext(ServletContext sc) {
                return webApplicationContext;
            }
        };
    }
814987
protected ClassLoader getClassLoader() {
        ClassLoader classLoader = null;
        try {
            classLoader = Thread.currentThread().getContextClassLoader();
        } catch (Throwable ex) {
            // Cannot access thread context ClassLoader - falling back...
        }
        return (classLoader != null ? classLoader : getClass().getClassLoader());
    }
161596
protected LoggerContext getContext(final Class<?> callerClass) {
        ClassLoader cl = null;
        if (callerClass != null) {
            cl = callerClass.getClassLoader();
        }
        if (cl == null) {
            cl = LoaderUtil.getThreadContextClassLoader();
        }
        return LogManager.getContext(cl, false);
    }
428746
synchronized public boolean load() {
		if (null == this.settingLoader) {
			settingLoader = new SettingLoader(this.groupedMap, this.charset, this.isUseVariable);
		}
		return settingLoader.load(new UrlResource(this.settingUrl));
	}
366066
public static ClassLoader getClassLoader() {
		ClassLoader classLoader = getContextClassLoader();
		if (classLoader == null) {
			classLoader = ClassLoaderUtil.class.getClassLoader();
			if (null == classLoader) {
				classLoader = ClassLoader.getSystemClassLoader();
			}
		}
		return classLoader;
	}
28711
public static ClassLoader getCurrentClassLoader() {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        if (cl == null) {
            cl = ClassLoaderUtils.class.getClassLoader();
        }
        return cl == null ? ClassLoader.getSystemClassLoader() : cl;
    }
192564
@NonNull
    public static File getAlbumRootPath(Context context) {
        if (sdCardIsAvailable()) {
            return new File(Environment.getExternalStorageDirectory(), CACHE_DIRECTORY);
        } else {
            return new File(context.getFilesDir(), CACHE_DIRECTORY);
        }
    }
1346201
static InputStream getCachedImageStream(URI url, Context context) {
        InputStream imageStream = null;
        if (url != null) {
            if (isCDNURL(url)) {
                try {
                    FileLruCache cache = getCache(context);
                    imageStream = cache.get(url.toString());
                } catch (IOException e) {
                    Logger.log(LoggingBehavior.CACHE, Log.WARN, TAG, e.toString());
                }
            }
        }

        return imageStream;
    }
891554
public static URL getResource(String resource, Class<?> context, boolean checkParent)
    {
        URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
        if (url != null)
            return url;

        if (context != null)
        {
            ClassLoader loader = context.getClassLoader();
            while (loader != null)
            {
                url = loader.getResource(resource);
                if (url != null)
                    return url;
                loader = checkParent ? loader.getParent() : null;
            }
        }

        return ClassLoader.getSystemResource(resource);
    }