private static ClassLoader getServiceLoaderClassLoader() { return testServiceLoaderClassLoader == null ? Loader.getClassLoaderOfClass(EnvUtil.class) : testServiceLoaderClassLoader; }
static public boolean isGroovyAvailable() { ClassLoader classLoader = Loader.getClassLoaderOfClass(EnvUtil.class); try { Class<?> bindingClass = classLoader.loadClass("groovy.lang.Binding"); return (bindingClass != null); } catch (ClassNotFoundException e) { return false; } }
static public boolean isGroovyAvailable() { ClassLoader classLoader = Loader.getClassLoaderOfClass(EnvUtil.class); try { Class bindingClass = classLoader.loadClass("groovy.lang.Binding"); return (bindingClass != null); } catch (ClassNotFoundException e) { return false; } }
/** * Get the class loader of the object passed as argument. Return the system * class loader if appropriate. * * @param o * @return */ public static ClassLoader getClassLoaderOfObject(Object o) { if (o == null) { throw new NullPointerException("Argument cannot be null"); } return getClassLoaderOfClass(o.getClass()); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
static public boolean isGroovyAvailable() { ClassLoader classLoader = Loader.getClassLoaderOfClass(EnvUtil.class); try { Class<?> bindingClass = classLoader.loadClass("groovy.lang.Binding"); return (bindingClass != null); } catch (ClassNotFoundException e) { return false; } }
static public boolean isGroovyAvailable() { ClassLoader classLoader = Loader.getClassLoaderOfClass(EnvUtil.class); try { Class<?> bindingClass = classLoader.loadClass("groovy.lang.Binding"); return (bindingClass != null); } catch (ClassNotFoundException e) { return false; } }
static public boolean isGroovyAvailable() { ClassLoader classLoader = Loader.getClassLoaderOfClass(EnvUtil.class); try { Class<?> bindingClass = classLoader.loadClass("groovy.lang.Binding"); return (bindingClass != null); } catch (ClassNotFoundException e) { return false; } }
/** * Get the class loader of the object passed as argument. Return the system * class loader if appropriate. * * @param o object to evaluate * @return the classloader of the object */ public static ClassLoader getClassLoaderOfObject(Object o) { if (o == null) { throw new NullPointerException("Argument cannot be null"); } return getClassLoaderOfClass(o.getClass()); }
/** * Get the class loader of the object passed as argument. Return the system * class loader if appropriate. * * @param o * @return */ public static ClassLoader getClassLoaderOfObject(Object o) { if (o == null) { throw new NullPointerException("Argument cannot be null"); } return getClassLoaderOfClass(o.getClass()); }
/** * Get the class loader of the object passed as argument. Return the system * class loader if appropriate. * * @param o * @return */ public static ClassLoader getClassLoaderOfObject(Object o) { if (o == null) { throw new NullPointerException("Argument cannot be null"); } return getClassLoaderOfClass(o.getClass()); }
/** * Get the class loader of the object passed as argument. Return the system * class loader if appropriate. * * @param o * @return */ public static ClassLoader getClassLoaderOfObject(Object o) { if (o == null) { throw new NullPointerException("Argument cannot be null"); } return getClassLoaderOfClass(o.getClass()); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource the resource name to look for * @return resource URL */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }
/** * Attempt to find a resource by using the classloader that loaded this class, * namely Loader.class. * * @param resource * @return */ public static URL getResourceBySelfClassLoader(String resource) { return getResource(resource, getClassLoaderOfClass(Loader.class)); }