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-myrmidon/container/src/java/org/apache/myrmidon/interfaces/oldmodel Dependency.java
Date Sun, 05 May 2002 13:28:57 GMT
donaldp     02/05/05 06:28:57

  Modified:    container/src/java/org/apache/myrmidon/interfaces/oldmodel
                        Dependency.java
  Log:
  Add a toString() method so as dependecies are serialized to form in same way that they are
parsed out.
  
  Revision  Changes    Path
  1.2       +18 -1     jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/oldmodel/Dependency.java
  
  Index: Dependency.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/interfaces/oldmodel/Dependency.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Dependency.java	28 Apr 2002 05:04:49 -0000	1.1
  +++ Dependency.java	5 May 2002 13:28:57 -0000	1.2
  @@ -11,7 +11,7 @@
    * A dependency for a target.
    *
    * @author <a href="mailto:adammurdoch@apache.org">Adam Murdoch</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/28 05:04:49 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/05 13:28:57 $
    */
   public class Dependency
   {
  @@ -42,5 +42,22 @@
       public String getTargetName()
       {
           return m_targetName;
  +    }
  +
  +    /**
  +     * Return human readable string for dependency.
  +     *
  +     * @return human readable string.
  +     */
  +    public String toString()
  +    {
  +        if( null == m_projectName )
  +        {
  +            return m_targetName;
  +        }
  +        else
  +        {
  +            return m_projectName + "->" + m_targetName;
  +        }
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message