public class ClassPreloadingUtils extends Object
| Constructor and Description |
|---|
ClassPreloadingUtils() |
| Modifier and Type | Method and Description |
|---|---|
static ClassLoader |
preloadClasses(Collection<File> jarFiles,
int classCountEstimation,
ClassLoader parentClassLoader,
ClassCondition classesToLoadByParent) |
static ClassLoader |
preloadClasses(Collection<File> jarFiles,
int classCountEstimation,
ClassLoader parentClassLoader,
ClassCondition classesToLoadByParent,
ClassHandler handler)
Creates a class loader that loads all classes from
jarFiles into memory to make loading faster (avoid skipping through zip archives). |
public static ClassLoader preloadClasses(Collection<File> jarFiles, int classCountEstimation, ClassLoader parentClassLoader, ClassCondition classesToLoadByParent, ClassHandler handler) throws IOException
jarFiles into memory to make loading faster (avoid skipping through zip archives).jarFiles - jars to load all classes fromclassCountEstimation - an estimated number of classes in a the jarsparentClassLoader - parent class loaderhandler - handler to be notified on class definitions done by this class loader, or nullclassesToLoadByParent - condition to load some classes via parent class loaderIOException - on from reading the jarpublic static ClassLoader preloadClasses(Collection<File> jarFiles, int classCountEstimation, ClassLoader parentClassLoader, ClassCondition classesToLoadByParent) throws IOException
IOExceptionCopyright © 2016. All rights reserved.