public static final class UrlClassLoader.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
UrlClassLoader.Builder |
allowBootstrapResources() |
UrlClassLoader.Builder |
allowLock()
ZipFile handles opened in JarLoader will be kept in SoftReference.
|
UrlClassLoader.Builder |
allowLock(boolean lockJars) |
UrlClassLoader.Builder |
allowUnescaped() |
UrlClassLoader.Builder |
autoAssignUrlsWithProtectionDomain() |
UrlClassLoader |
get() |
UrlClassLoader.Builder |
logJarAccess(boolean logJarAccess) |
UrlClassLoader.Builder |
noPreload() |
UrlClassLoader.Builder |
parent(java.lang.ClassLoader parent) |
UrlClassLoader.Builder |
setLogErrorOnMissingJar(boolean log) |
UrlClassLoader.Builder |
urls(java.util.List<java.net.URL> urls) |
UrlClassLoader.Builder |
urls(java.net.URL... urls) |
UrlClassLoader.Builder |
urlsInterned() |
UrlClassLoader.Builder |
useCache()
Build backward index of packages / class or resource names that allows avoiding IO during classloading.
|
UrlClassLoader.Builder |
useCache(boolean useCache) |
UrlClassLoader.Builder |
useCache(UrlClassLoader.CachePool pool,
UrlClassLoader.CachingCondition condition)
Requests the class loader being built to use cache and, if possible, retrieve and store the cached data from a special cache pool
that can be shared between several loaders.
|
UrlClassLoader.Builder |
useLazyClassloadingCaches(boolean pleaseBeLazy)
Package contents information in Jar/File loaders will be lazily retrieved / cached upon classloading.
|
UrlClassLoader.Builder |
usePersistentClasspathIndexForLocalClassDirectories()
FileLoader will save list of files / packages under its root and use this information instead of walking filesystem for
speedier classloading.
|
public UrlClassLoader.Builder urls(java.util.List<java.net.URL> urls)
public UrlClassLoader.Builder urls(java.net.URL... urls)
public UrlClassLoader.Builder parent(java.lang.ClassLoader parent)
public UrlClassLoader.Builder allowLock()
public UrlClassLoader.Builder allowLock(boolean lockJars)
public UrlClassLoader.Builder useCache()
public UrlClassLoader.Builder useCache(boolean useCache)
public UrlClassLoader.Builder usePersistentClasspathIndexForLocalClassDirectories()
public UrlClassLoader.Builder logJarAccess(boolean logJarAccess)
public UrlClassLoader.Builder urlsInterned()
public UrlClassLoader.Builder useCache(UrlClassLoader.CachePool pool, UrlClassLoader.CachingCondition condition)
pool
- cache poolcondition
- a custom policy to provide a possibility to prohibit caching for some URLs.UrlClassLoader.createCachePool()
public UrlClassLoader.Builder allowUnescaped()
public UrlClassLoader.Builder noPreload()
public UrlClassLoader.Builder allowBootstrapResources()
public UrlClassLoader.Builder setLogErrorOnMissingJar(boolean log)
public UrlClassLoader.Builder useLazyClassloadingCaches(boolean pleaseBeLazy)
public UrlClassLoader.Builder autoAssignUrlsWithProtectionDomain()
public UrlClassLoader get()