ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model TypeLib.java DefaultProject.java Project.java Import.java
Date Wed, 27 Jun 2001 01:17:24 GMT
donaldp     01/06/26 18:17:24

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/builder
                        DefaultProjectBuilder.java
               proposal/myrmidon/src/java/org/apache/myrmidon/components/model
                        DefaultProject.java Project.java
  Added:       proposal/myrmidon/src/java/org/apache/myrmidon/components/model
                        TypeLib.java
  Removed:     proposal/myrmidon/src/java/org/apache/myrmidon/components/model
                        Import.java
  Log:
  Changed name of Import->TypeLib
  
  Revision  Changes    Path
  1.11      +5 -5      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
  
  Index: DefaultProjectBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultProjectBuilder.java	2001/06/27 00:48:50	1.10
  +++ DefaultProjectBuilder.java	2001/06/27 01:17:14	1.11
  @@ -23,7 +23,7 @@
   import org.apache.myrmidon.api.TaskContext;
   import org.apache.myrmidon.framework.Condition;
   import org.apache.myrmidon.components.model.DefaultProject;
  -import org.apache.myrmidon.components.model.Import;
  +import org.apache.myrmidon.components.model.TypeLib;
   import org.apache.myrmidon.components.model.Project;
   import org.apache.myrmidon.components.model.Target;
   import org.xml.sax.SAXException;
  @@ -189,7 +189,7 @@
               {
                   if( name.equals( "import" ) )
                   {
  -                    buildImport( project, element );
  +                    buildTypeLib( project, element );
                       continue;
                   }
                   else
  @@ -270,8 +270,8 @@
           project.addProject( name, other );
       }
   
  -    private void buildImport( final DefaultProject project,
  -                              final Configuration element )
  +    private void buildTypeLib( final DefaultProject project,
  +                               final Configuration element )
           throws Exception
       {
           final String library = element.getAttribute( "library", null );
  @@ -294,7 +294,7 @@
               }
           }
   
  -        project.addImport( new Import( library, type, name ) );
  +        project.addTypeLib( new TypeLib( library, type, name ) );
       }
   
       /**
  
  
  
  1.5       +4 -4      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java
  
  Index: DefaultProject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultProject.java	2001/06/12 13:41:39	1.4
  +++ DefaultProject.java	2001/06/27 01:17:18	1.5
  @@ -43,9 +43,9 @@
        *
        * @return the imports
        */
  -    public Import[] getImports()
  +    public TypeLib[] getTypeLibs()
       {
  -        return (Import[])m_imports.toArray( new Import[ 0 ] );
  +        return (TypeLib[])m_imports.toArray( new TypeLib[ 0 ] );
       }
   
       /**
  @@ -151,9 +151,9 @@
           m_baseDirectory = baseDirectory;
       }
   
  -    public final void addImport( final Import importEntry )
  +    public final void addTypeLib( final TypeLib typeLib )
       {
  -        m_imports.add( importEntry );
  +        m_imports.add( typeLib );
       }
   
       /**
  
  
  
  1.5       +1 -1      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Project.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Project.java	2001/06/17 10:35:39	1.4
  +++ Project.java	2001/06/27 01:17:20	1.5
  @@ -38,7 +38,7 @@
        *
        * @return the imports
        */
  -    Import[] getImports();
  +    TypeLib[] getTypeLibs();
   
       /**
        * Get names of projects referred to by this project.
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/TypeLib.java
  
  Index: TypeLib.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 file.
   */
  package org.apache.myrmidon.components.model;
  
  /**
   * Imports in a build file.
   *
   * @author <a href="mailto:donaldp@apache.org">Peter Donald</a>
   */
  public class TypeLib
  {
      //Name of library (this is location independent)
      private final String    m_library;
  
      //Do we need this??
      //private final String    m_namespace;
  
      //The type to be imported from library
      private final String    m_type;
  
      //The name of type instance
      private final String    m_name;
  
      public TypeLib( final String library )
      {
          this( library, null, null );
      }
  
      public TypeLib( final String library, final String type, final String name )
      {
          m_library = library;
          m_type = type;
          m_name = name;
         
          //If only one of name or type is null, throw an exception
          if( null == m_type || null == m_name )
          {
              if( null != m_type || null != m_name )
              {
                  throw new IllegalArgumentException( "Can not have an import that specifies
" +
                                                      "only one of name or type" );
              }
          }
      }
  
      /**
       * Get type
       *
       * @return the type
       */
      public final String getType()
      {
          return m_type;
      }
  
      /**
       * Get name of imported 
       *
       * @return the name
       */
      public final String getName()
      {
          return m_name;
      }
  
      /**
       * Get name of library 
       *
       * @return the library name
       */
      public final String getLibrary()
      {
          return m_library;
      }
  }
  
  
  
  
  

Mime
View raw message