code: protected static ClassLoader createClassLoader( Collection artifacts, Set previousArtifacts )
          throws MalformedURLException
      {
          URLClassLoader cl = null;
          if ( !artifacts.isEmpty() )
          {
              List urls = new ArrayList( artifacts.size() );
              for ( Iterator i = artifacts.iterator(); i.hasNext(); )
              {
                  Artifact artifact = (Artifact) i.next();
                  if ( previousArtifacts == null || !previousArtifacts.contains( artifact ) )
                  {
                      urls.add( artifact.getFile().toURI().toURL() );
                  }
              }
              if ( !urls.isEmpty() )
              {
                  cl = new URLClassLoader( (URL[]) urls.toArray( EMPTY_URL_ARRAY ) );
              }
          }
          return cl;
      }
docs: Create a ClassLoader, which includes the artifacts in <code>artifacts</code>,
  but excludes the artifacts in <code>previousArtifacts</code>. The intention is,
  that we let BCEL inspect the artifacts in the latter set, using a
  {@link ClassLoader}, which contains the dependencies. However, the
  {@link ClassLoader} must not contain the jar files, which are being inspected.
  
  @param artifacts         The artifacts, from which to build a {@link ClassLoader}.
  @param previousArtifacts The artifacts being inspected, or null, if te
  returned {@link ClassLoader} should contain all the elements of
  <code>artifacts</code>.
  @return A {@link ClassLoader} which may be used to inspect the classes in
  previousArtifacts.
  @throws MalformedURLException Failed to convert a file to an URL.