avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/builder XMLProfileCreator.java
Date Wed, 11 Dec 2002 05:05:58 GMT
mcconnell    2002/12/10 21:05:58

  Modified:    meta/src/etc project.mf
               meta/src/java/org/apache/avalon/meta/model Category.java
               meta/src/java/org/apache/avalon/meta/model/builder
                        XMLProfileCreator.java
  Log:
  Minor convinience updates to constructors to make coding simpler.
  
  Revision  Changes    Path
  1.2       +2 -2      avalon-sandbox/meta/src/etc/project.mf
  
  Index: project.mf
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/src/etc/project.mf,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.mf	24 Nov 2002 12:58:26 -0000	1.1
  +++ project.mf	11 Dec 2002 05:05:58 -0000	1.2
  @@ -1,6 +1,6 @@
   Manifest-Version: 1.0
  -Created-By: OSM SARL
  -Extension-Name: excalibur-meta
  +Created-By: Apache Avalon
  +Extension-Name: avalon-meta
   Specification-Vendor: Apache Software Foundation
   Specification-Version: 1.0
   Implementation-Vendor: Apache Software Foundation
  
  
  
  1.2       +12 -1     avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Category.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Category.java	24 Nov 2002 12:58:28 -0000	1.1
  +++ Category.java	11 Dec 2002 05:05:58 -0000	1.2
  @@ -133,6 +133,17 @@
       }
   
       /**
  +     * Creation of a new Category using a supplied name and priority.
  +     *
  +     * @param name the category name
  +     * @param priority the category priority - DEBUG, INFO, WARN, or ERROR
  +     */
  +    public Category( final String name, String priority )
  +    {
  +        this( name, priority, null );
  +    }
  +
  +    /**
        * Creation of a new Category using a supplied name, priority, target and
        * collection of subsidiary categories.
        *
  
  
  
  1.4       +15 -8     avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/builder/XMLProfileCreator.java
  
  Index: XMLProfileCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/builder/XMLProfileCreator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XMLProfileCreator.java	3 Dec 2002 07:01:21 -0000	1.3
  +++ XMLProfileCreator.java	11 Dec 2002 05:05:58 -0000	1.4
  @@ -113,14 +113,16 @@
       * Creation of a profile builder that uses the supplied base class for
       * new profile creation.
       * @param base the profile base class
  -    * @exception Exception if the supplied base class has an incompatible constructor
  +    * @exception RuntimeException if the supplied base class has an incompatible constructor
       */
  -    public XMLProfileCreator( Class base ) throws Exception
  +    public XMLProfileCreator( Class base )
       {
           m_clazz = base;
  -        m_base = base.getConstructor( 
  -          new Class[]
  -          {
  +        try
  +        {
  +            m_base = base.getConstructor( 
  +             new Class[]
  +             {
                 String.class, 
                 Parameters.class,
                 Configuration.class,
  @@ -128,8 +130,13 @@
                 LoggingDirective.class,
                 Type.class,
                 Mode.class
  -          }
  -        );
  +             }
  +           );
  +        }
  +        catch( Throwable e )
  +        {
  +           throw new RuntimeException( e.toString() );
  +        }
       }
   
      /**
  
  
  

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