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-phoenix/src/java/org/apache/avalon/phoenix/components/cpbuilder/builder ClassLoaderSetBuilder.java
Date Sun, 01 Sep 2002 04:17:46 GMT
donaldp     2002/08/31 21:17:46

  Modified:    src/java/org/apache/avalon/phoenix/components/cpbuilder/builder
                        ClassLoaderSetBuilder.java
  Log:
  Finish up builder
  
  Revision  Changes    Path
  1.2       +42 -4     jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/cpbuilder/builder/ClassLoaderSetBuilder.java
  
  Index: ClassLoaderSetBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/java/org/apache/avalon/phoenix/components/cpbuilder/builder/ClassLoaderSetBuilder.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClassLoaderSetBuilder.java	1 Sep 2002 04:11:27 -0000	1.1
  +++ ClassLoaderSetBuilder.java	1 Sep 2002 04:17:46 -0000	1.2
  @@ -79,15 +79,53 @@
   
           final EntryDef[] entrys =
               buildEntrys( config.getChildren( "entry" ) );
  -        final Extension[] extensions = null;
  -            //buildExtensions( config.getChildren( "extension" ) );
  +        final Extension[] extensions =
  +            buildExtensions( config.getChildren( "extension" ) );
           final FileSetDef[] fileSets =
               buildFileSets( config.getChildren( "fileset" ) );
           return new ClassLoaderDef( name, parent, entrys,
                                      extensions, fileSets );
       }
   
  -    private FileSetDef[] buildFileSets( Configuration[] configs )
  +    private Extension[] buildExtensions( final Configuration[] configs )
  +        throws ConfigurationException
  +    {
  +        final ArrayList extensions = new ArrayList();
  +
  +        for( int i = 0; i < configs.length; i++ )
  +        {
  +            final Extension extension =
  +                buildExtension( configs[ i ] );
  +            extensions.add( extension );
  +        }
  +
  +        return (Extension[])extensions.toArray( new Extension[ extensions.size() ] );
  +    }
  +
  +    private Extension buildExtension( final Configuration config )
  +        throws ConfigurationException
  +    {
  +        final String name =
  +            config.getChild( "name" ).getValue();
  +        final String specVersion =
  +            config.getChild( "specification-version" ).getValue( null );
  +        final String specVendor =
  +            config.getChild( "specification-vendor" ).getValue( null );
  +        final String implVersion =
  +            config.getChild( "implementation-version" ).getValue( null );
  +        final String implVendor =
  +            config.getChild( "implementation-vendor" ).getValue( null );
  +        final String implVendorID =
  +            config.getChild( "implementation-vendor-id" ).getValue( null );
  +        final String implURL =
  +            config.getChild( "implementation-url" ).getValue( null );
  +
  +        return new Extension( name, specVersion, specVendor,
  +                              implVersion, implVendor, implVendorID,
  +                              implURL );
  +    }
  +
  +    private FileSetDef[] buildFileSets( final Configuration[] configs )
           throws ConfigurationException
       {
           final ArrayList fileSets = new ArrayList();
  
  
  

--
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