You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/06/04 04:24:57 UTC

cvs commit: avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/tags AbstractTag.java DependencyTag.java

mcconnell    2003/06/03 19:24:57

  Modified:    merlin/merlin-smp/xdocs/tools ant.xml
               merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/tags
                        AbstractTag.java DependencyTag.java
  Log:
  Meta tags generation update to handle supertype graph processing by Kristian  Meier.
  
  Revision  Changes    Path
  1.4       +5 -3      avalon-sandbox/merlin/merlin-smp/xdocs/tools/ant.xml
  
  Index: ant.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-smp/xdocs/tools/ant.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ant.xml	14 May 2003 09:36:09 -0000	1.3
  +++ ant.xml	4 Jun 2003 02:24:57 -0000	1.4
  @@ -7,8 +7,9 @@
     </properties>
     <body>
       <section name="Introduction">
  -<p>
  -The meta info generator task scans sources files for the present of an avalon.meta tags and based on the tag set specification, generates either XML or serialized meta-info descriptors.      </p>
  +      <p>
  +The meta info generator task scans sources files for the present of an avalon.meta tags and based on the tag set specification, generates either XML or serialized meta-info descriptors.
  +      </p>
   
         <subsection name="Parameters">
   <table>
  @@ -24,7 +25,8 @@
       <td>The output format. May be one of <strong>xml</strong> or <strong>serial</strong>.  The xml format is less compact but more portable.  The serial format is appropriate when usage is know to be in the context of the Avalon Meta API.  The serial format is a serialized representation of the corresponding Task or Service instance.</td>
     </tr>
     <tr>
  -    <td>A boolean flag to force regenerating of the meta-files. <strong>false</strong> (default) will generate the meta-file if the source is newer than the exisiting meta-file or if the meta-file does not exist. <strong>true</strong> will generate the meta-file even if the file already exists.</td>
  +    <td>force</td><td>false</td>
  +    <td>A boolean flag to force regenerating of the meta-files. <strong>false</strong> (default) will generate the meta-file if the source is newer than the exisiting meta-file or if the meta-file does not exist. <strong>true</strong> will overwrite any existing meta-file irrespective of the modification date.</td>
     </tr>
   </table>
         </subsection>
  
  
  
  1.5       +16 -23    avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/tags/AbstractTag.java
  
  Index: AbstractTag.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/tags/AbstractTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AbstractTag.java	14 May 2003 09:36:10 -0000	1.4
  +++ AbstractTag.java	4 Jun 2003 02:24:57 -0000	1.5
  @@ -211,18 +211,16 @@
           if( type.indexOf(":") > -1 )
           {
               resolvedType = this.doResolveType( getJavaClass(), 
  -                            type.substring( 0, type.indexOf(":") ) );
  -        }    
  +                                     type.substring( 0, type.indexOf(":") ) );
  +        }
           else
           {
  -            resolvedType = doResolveType( getJavaClass(), type );
  +            resolvedType = this.doResolveType( getJavaClass(), type );
           }
           if( resolvedType == null )
           {
  -            final String message = 
  -              "Unable to find type " + type
  -              + " in class " + getJavaClass().getFullyQualifiedName();
  -            throw new RuntimeException( message );   
  +            throw new RuntimeException( "can not find type " + type +
  +                              " in class " + getJavaClass().getFullyQualifiedName() );   
           }
           else 
           {
  @@ -237,18 +235,18 @@
           {
               return resolvedType;
           }
  -        else if( clazz.getSuperJavaClass() == null || 
  -          JavaClass.OBJECT.equals( clazz.getSuperClass() ) )
  +        else if( 
  +          clazz.getSuperJavaClass() == null 
  +          || JavaClass.OBJECT.equals( clazz.getSuperClass() ) )
           {
               return null;
           }
           else 
           {
  -            return doResolveType( clazz.getSuperJavaClass(), type );
  +            return this.doResolveType( clazz.getSuperJavaClass(), type );
           }
       }
   
  -
       /**
        * Retrieve a method with specified name and one parameter of specified
        * type. The method must also return void.
  @@ -260,13 +258,12 @@
       protected JavaMethod getLifecycleMethod( final String methodName,
                                                final String parameterType )
       {
  -        return findLifecycleMethod( getJavaClass(), methodName, parameterType );
  +        return this.findLifecycleMethod( getJavaClass(), methodName, parameterType );
       }
   
  -    private JavaMethod findLifecycleMethod( 
  -            final JavaClass clazz,
  -            final String methodName,
  -            final String parameterType )
  +    private JavaMethod findLifecycleMethod( final JavaClass clazz,
  +                                  final String methodName,
  +                                  final String parameterType )
       {
           final JavaMethod[] methods = clazz.getMethods();
           for( int i = 0; i < methods.length; i++ )
  @@ -280,17 +277,13 @@
                   return method;
               }
           }
  -
  -        if( 
  -            clazz.getSuperJavaClass() == null 
  -            || JavaClass.OBJECT.equals( clazz.getSuperClass() ) )
  +        if( clazz.getSuperJavaClass() == null || JavaClass.OBJECT.equals( clazz.getSuperClass() ) )
           {
               return null;
           }
  -        else
  +        else 
           {
  -            return this.findLifecycleMethod( 
  -              clazz.getSuperJavaClass(), methodName, parameterType );
  +            return this.findLifecycleMethod( clazz.getSuperJavaClass(), methodName, parameterType );
           }
       }
   }
  
  
  
  1.5       +1 -5      avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/tags/DependencyTag.java
  
  Index: DependencyTag.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-tools/src/java/org/apache/avalon/meta/info/builder/tags/DependencyTag.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DependencyTag.java	14 May 2003 09:36:10 -0000	1.4
  +++ DependencyTag.java	4 Jun 2003 02:24:57 -0000	1.5
  @@ -123,12 +123,8 @@
           {
               return new DependencyDescriptor[0];
           }
  -
           final ArrayList deps = new ArrayList();
  -        final DocletTag[] tags = 
  -          getMethod().getTagsByName( getNS() 
  -          + Tags.DELIMITER + KEY );
  -
  +        final DocletTag[] tags = getMethod().getTagsByName( getNS() + Tags.DELIMITER + KEY );
           for( int i = 0; i < tags.length; i++ )
           {
               deps.add( getDependency( tags[i] ) );
  
  
  

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