avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hamm...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate XinfoFactory.java
Date Sun, 29 Sep 2002 12:20:41 GMT
hammant     2002/09/29 05:20:41

  Modified:    metagenerate/src/java/org/apache/avalon/excalibur/metagenerate
                        XinfoFactory.java
  Log:
  Small refactorings for modularitys sake
  
  Revision  Changes    Path
  1.4       +37 -7     jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate/XinfoFactory.java
  
  Index: XinfoFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate/XinfoFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XinfoFactory.java	29 Sep 2002 12:12:04 -0000	1.3
  +++ XinfoFactory.java	29 Sep 2002 12:20:41 -0000	1.4
  @@ -52,23 +52,56 @@
   
           // services
   
  +        processServiceInterfaces(xinfo);
  +
  +        xinfo.writeEndOfServicesSection();
  +
  +        processManagementInterfaces(xinfo);
  +
  +        xinfo.writeEndOfManagementSection();
  +
  +        processServiceMethod(xinfo);
  +        xinfo.writeFooter();
  +        xinfo.close();
  +
  +    }
  +
  +    /**
  +     * Process the service interfaces
  +     * @param xinfo the xinfo helper
  +     * @throws IOException If a problem
  +     */
  +    private void processServiceInterfaces(XinfoHelper xinfo) throws IOException
  +    {
           DocletTag[] services = m_javaClass.getTagsByName("phoenix:service");
           for (int i = 0; i < services.length; i++)
           {
               DocletTag service = services[i];
               xinfo.writeServiceLines(service.getNamedParameter("name"));
           }
  +    }
   
  -        xinfo.writeEndOfServicesSection();
  -
  +    /**
  +     * Process the management interface lines
  +     * @param xinfo the xinfo helper
  +     * @throws IOException If a problem
  +     */
  +    private void processManagementInterfaces(XinfoHelper xinfo) throws IOException
  +    {
           DocletTag[] managementInterfaces = m_javaClass.getTagsByName("phoenix:mx");
           for (int i = 0; i < managementInterfaces.length; i++)
           {
               xinfo.writeManagementLine(managementInterfaces[i].getNamedParameter("name"));
           }
  +    }
   
  -        xinfo.writeEndOfManagementSection();
  -
  +    /**
  +     * Process the service method. Cehck for the right signature.
  +     * @param xinfo The xinfo helper
  +     * @throws IOException If a problem
  +     */
  +    private void processServiceMethod(XinfoHelper xinfo) throws IOException
  +    {
           JavaMethod[] methods = m_javaClass.getMethods();
           for (int j = 0; j < methods.length; j++)
           {
  @@ -89,9 +122,6 @@
                   }
               }
           }
  -        xinfo.writeFooter();
  -        xinfo.close();
  -
       }
   
   
  
  
  

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