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 NamedXmlSnippet.java MxinfoFactory.java MxinfoHelper.java Attribute.java Operation.java
Date Sun, 29 Sep 2002 12:27:57 GMT
hammant     2002/09/29 05:27:57

  Modified:    metagenerate/src/java/org/apache/avalon/excalibur/metagenerate
                        MxinfoFactory.java MxinfoHelper.java
  Added:       metagenerate/src/java/org/apache/avalon/excalibur/metagenerate
                        NamedXmlSnippet.java
  Removed:     metagenerate/src/java/org/apache/avalon/excalibur/metagenerate
                        Attribute.java Operation.java
  Log:
  A small rename to eliminate a class
  
  Revision  Changes    Path
  1.4       +2 -2      jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate/MxinfoFactory.java
  
  Index: MxinfoFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate/MxinfoFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MxinfoFactory.java	29 Sep 2002 09:12:57 -0000	1.3
  +++ MxinfoFactory.java	29 Sep 2002 12:27:56 -0000	1.4
  @@ -96,7 +96,7 @@
               Type attributeType = method.getReturns();
               String attributeTypeString = attributeType.getValue() + (attributeType.isArray()
? "[]" : "");
   
  -            Attribute attr = mxinfo.makeAttrLines(attributeName,
  +            NamedXmlSnippet attr = mxinfo.makeAttrLines(attributeName,
                       "\"" + comment + "\"",
                       attributeTypeString);
               m_attributes.add(attr);
  @@ -128,7 +128,7 @@
   
               }
               xml = xml + mxinfo.makeOperationFooter();
  -            Operation operation = new Operation(operationName,xml);
  +            NamedXmlSnippet operation = new NamedXmlSnippet(operationName,xml);
               m_operations.add(operation);
           }
           return xml;
  
  
  
  1.3       +4 -4      jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate/MxinfoHelper.java
  
  Index: MxinfoHelper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate/MxinfoHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MxinfoHelper.java	29 Sep 2002 00:19:13 -0000	1.2
  +++ MxinfoHelper.java	29 Sep 2002 12:27:57 -0000	1.3
  @@ -115,7 +115,7 @@
        * @param type The type
        * @throws IOException If a problem writing output
        */
  -    public Attribute makeAttrLines(String attrName, String description, String type) throws
IOException
  +    public NamedXmlSnippet makeAttrLines(String attrName, String description, String type)
throws IOException
       {
           String xml = "";
           for (int i = 0; i < ATTRIBUTE.length; i++)
  @@ -126,7 +126,7 @@
               line = replaceString(line, "@RETURN@", type);
               xml = xml + line + "\n";
           }
  -        return new Attribute(attrName, xml);
  +        return new NamedXmlSnippet(attrName, xml);
       }
   
       /**
  @@ -139,7 +139,7 @@
           Collections.sort(attributes);
           for (Iterator iterator = attributes.iterator(); iterator.hasNext();)
           {
  -            Attribute attribute = (Attribute) iterator.next();
  +            NamedXmlSnippet attribute = (NamedXmlSnippet) iterator.next();
               m_output.write(attribute.getXml());
           }
       }
  @@ -224,7 +224,7 @@
           Collections.sort(operations);
           for (Iterator iterator = operations.iterator(); iterator.hasNext();)
           {
  -            Operation operation = (Operation) iterator.next();
  +            NamedXmlSnippet operation = (NamedXmlSnippet) iterator.next();
               m_output.write(operation.getXml());
           }
       }
  
  
  
  1.1                  jakarta-avalon-excalibur/metagenerate/src/java/org/apache/avalon/excalibur/metagenerate/NamedXmlSnippet.java
  
  Index: NamedXmlSnippet.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.avalon.excalibur.metagenerate;
  
  /**
   * A named XML snippet
   * @author Paul Hammant
   */
  public class NamedXmlSnippet implements Comparable
  {
      private String m_name;
      private String m_xml;
  
      /**
       * Construct an NamedXmlSnippet
       * @param name The node name
       * @param xml the XML
       */
      public NamedXmlSnippet(String name, String xml)
      {
          this.m_name = name;
          this.m_xml = xml;
      }
  
      /**
       * Get the name
       * @return The Name
       */
      public String getName()
      {
          return m_name;
      }
  
      /**
       * Get the XML
       * @return The XML
       */
      public String getXml()
      {
          return m_xml;
      }
  
      /**
       * From comparable
       * @param object The object to compare to.
       * @return whichever is order precidence
       */
      public int compareTo(Object object)
      {
          NamedXmlSnippet attr = (NamedXmlSnippet) object;
          return m_name.compareTo(attr.getName());
      }
  }
  
  
  

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