/** * Subclasses can override if they wish to control the classloader * registration to loader repository. * * @param cl classloader */ protected void registerClassLoader(ClassLoader cl) { if( (cl instanceof RealClassLoader) == false ) { // Only register non-UCLs as UCLs already have a repository loaderRepository.addClassLoader(cl); } }
/** * Subclasses can override if they wish to control the classloader * registration to loader repository. * * @param cl classloader */ protected void registerClassLoader(ClassLoader cl) { if( (cl instanceof RealClassLoader) == false ) { // Only register non-UCLs as UCLs already have a repository loaderRepository.addClassLoader(cl); } }
/** * Construct a <tt>UnifiedClassLoader</tt> and registers it to the given * repository. * @param url The single URL to load classes from. * @param origURL the possibly null original URL from which url may * be a local copy or nested jar. * @param repository the repository this classloader delegates to * be a local copy or nested jar. */ public UnifiedClassLoader(URL url, URL origURL, LoaderRepository repository) { this(url, origURL); // set the repository reference this.setRepository(repository); // register this loader to the given repository repository.addClassLoader(this); }
/** * Construct a <tt>UnifiedClassLoader</tt> and registers it to the given * repository. * @param url The single URL to load classes from. * @param origURL the possibly null original URL from which url may * be a local copy or nested jar. * @param repository the repository this classloader delegates to * be a local copy or nested jar. */ public UnifiedClassLoader(URL url, URL origURL, LoaderRepository repository) { this(url, origURL); // set the repository reference this.setRepository(repository); // register this loader to the given repository repository.addClassLoader(this); }