@Override public final ClassLoader getClassLoader() { return callable.getClassLoader(); }
@Override public final ClassLoader getClassLoader() { return callable.getClassLoader(); }
/*package*/ static ClassLoader getClassLoader(Callable<?,?> c) { ClassLoader result = null; if(c instanceof DelegatingCallable) { result =((DelegatingCallable)c).getClassLoader(); } else { result = c.getClass().getClassLoader(); } if (result == null) { result = ClassLoader.getSystemClassLoader(); } return result; }
/*package*/ static ClassLoader getClassLoader(Callable<?,?> c) { ClassLoader result = null; if(c instanceof DelegatingCallable) { result =((DelegatingCallable)c).getClassLoader(); } else { result = c.getClass().getClassLoader(); } if (result == null) { result = ClassLoader.getSystemClassLoader(); } return result; }
/*package*/ static ClassLoader getClassLoader(Callable<?,?> c) { ClassLoader result = null; if(c instanceof DelegatingCallable) { result =((DelegatingCallable)c).getClassLoader(); } else { result = c.getClass().getClassLoader(); } if (result == null) { result = ClassLoader.getSystemClassLoader(); } return result; }
/** * Retrieves classloader for the callable. * For {@link DelegatingCallable} the method will try to retrieve a classloader specified there. * If it is not available, a classloader from the class will be tried. * If it is not available as well, {@link ClassLoader#getSystemClassLoader()} will be used * @param c Callable * @return Classloader from the callable. May be {@code null} if all attempts to retrieve the classloader return {@code null}. */ @CheckForNull /*package*/ static ClassLoader getClassLoader(@Nonnull Callable<?,?> c) { ClassLoader result = null; if(c instanceof DelegatingCallable) { result =((DelegatingCallable)c).getClassLoader(); } if (result == null) { result = c.getClass().getClassLoader(); } if (result == null) { result = ClassLoader.getSystemClassLoader(); } return result; }