avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder SimpleLoaderResolver.java
Date Thu, 31 Oct 2002 07:08:02 GMT
donaldp     2002/10/30 23:08:01

  Modified:    loader/src/java/org/apache/excalibur/loader/builder
                        SimpleLoaderResolver.java
  Log:
  Refactor to make subclass friendly.
  
  Revision  Changes    Path
  1.6       +19 -3     jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder/SimpleLoaderResolver.java
  
  Index: SimpleLoaderResolver.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/loader/builder/SimpleLoaderResolver.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SimpleLoaderResolver.java	31 Oct 2002 06:21:22 -0000	1.5
  +++ SimpleLoaderResolver.java	31 Oct 2002 07:08:01 -0000	1.6
  @@ -151,6 +151,23 @@
                                             final URL[] urls )
           throws Exception
       {
  +        final URL[] classpath = determineCompleteClasspath( urls );
  +        return new URLClassLoader( classpath, parent );
  +    }
  +
  +    /**
  +     * Retrieve the complete classpath given an input set of URLs.
  +     * The complete classpath includes all URLs for extensions
  +     * required by the jars (according to the "Optional Package"
  +     * Spec).
  +     *
  +     * @param urls the urls
  +     * @return the complete set of URLs for classpath
  +     * @throws Exception if unable to determine complete classpath set
  +     */
  +    protected final URL[] determineCompleteClasspath( final URL[] urls )
  +        throws Exception
  +    {
           final ArrayList classpathSet = new ArrayList();
   
           //Add all supplied URLS to classpath
  @@ -172,8 +189,7 @@
           //Define final classpath with all dependencies added
           final URL[] classpath =
               (URL[])classpathSet.toArray( new URL[ classpathSet.size() ] );
  -
  -        return new URLClassLoader( classpath, parent );
  +        return classpath;
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message