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/api/src/java/org/apache/myrmidon/api/event TaskEvent.java
Date Tue, 02 Jul 2002 07:27:28 GMT
donaldp     2002/07/02 00:27:28

  Modified:    api/src/java/org/apache/myrmidon/api/event TaskEvent.java
  Log:
  Add a utility method to aquire QualifiedName of Task from event
  
  Also moved the SEPARATOR constant to TaskContext
  
  Revision  Changes    Path
  1.7       +20 -11    jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/api/event/TaskEvent.java
  
  Index: TaskEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/api/src/java/org/apache/myrmidon/api/event/TaskEvent.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TaskEvent.java	2 Jul 2002 06:37:51 -0000	1.6
  +++ TaskEvent.java	2 Jul 2002 07:27:28 -0000	1.7
  @@ -7,6 +7,8 @@
    */
   package org.apache.myrmidon.api.event;
   
  +import org.apache.myrmidon.api.TaskContext;
  +
   /**
    * The TaskEvent object notifies {@link TaskListener} objects
    * when a {@link org.apache.myrmidon.api.Task} starts, stops
  @@ -19,11 +21,6 @@
   public final class TaskEvent
   {
       /**
  -     * Separator for elements in TaskEvents name/path.
  -     */
  -    public final static char SEPARATOR = '/';
  -
  -    /**
        * The path to task. A path is made of of 0 or more elements.
        * Each element in path is separated by a '/' character. An
        * example path is "/myproject/mytarget".
  @@ -126,6 +123,17 @@
       }
   
       /**
  +     * Retrieve the name of task that this event is about.
  +     *
  +     * @return the name of task
  +     * @see #m_name
  +     */
  +    public String getName()
  +    {
  +        return m_name;
  +    }
  +
  +    /**
        * Retrieve the path to task that this event is about.
        *
        * @return the path to task
  @@ -137,14 +145,15 @@
       }
   
       /**
  -     * Retrieve the name of task that this event is about.
  +     * Return the fully qualified name of task.
        *
  -     * @return the name of task
  -     * @see #m_name
  +     * @return the fully qualified name of task
  +     * @see #getName
  +     * @see #getPath
        */
  -    public String getName()
  +    public String getQualifiedName()
       {
  -        return m_name;
  +        return getPath() + TaskContext.SEPARATOR + getName();
       }
   
       /**
  
  
  

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