Java examples for Reflection:Class Loader
Returns the given loader or the sytem classloader if loader is null
//package com.java2s; public class Main { /**// ww w . j av a 2s . c om * Returns the given loader or the sytem classloader if loader is null * * @param loader * @return */ public static ClassLoader getLoaderOrSystemLoader(ClassLoader loader) { if (loader != null) { return loader; } else { return ClassLoader.getSystemClassLoader(); } } }