ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <j_a_fernan...@yahoo.com>
Subject Re: cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant Task.java
Date Sun, 16 Dec 2001 14:30:39 GMT
Not that I following too close what you are doing in myrmidon, but
wouldn't Task.getName() be associated in peoples minds with Task.setName() ?
The later being the method for processing an attribute named "name".

In a GUI environment you may have the GUI trying to treat the task
as a Bean and hence thinking that getName() and setName() refer to the same value,
JavaScript takes the same approach. But here getName() referes to something 
completely different.

Somehow I think we need to deliniate some pattern to diferentiate general APIs of tasks
 from the patterns used to define attributes and elements of tasks (manipulated
at the XML level) I think that is important to enforce separation between internal, public,
and XML accessible APIs.

Jose Alberto

----- Original Message ----- 
From: <donaldp@apache.org>
To: <jakarta-ant-cvs@apache.org>
Sent: Sunday, December 16, 2001 4:11 AM
Subject: cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant Task.java


> donaldp     01/12/15 20:11:56
> 
>   Modified:    proposal/myrmidon/src/main/org/apache/tools/ant Task.java
>   Log:
>   getTaskName() -> getName() and this is inherited from AbstractTask
>   
>   Revision  Changes    Path
>   1.5       +1 -22     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Task.java
>   
>   Index: Task.java
>   ===================================================================
>   RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Task.java,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- Task.java 2001/12/16 03:10:16 1.4
>   +++ Task.java 2001/12/16 04:11:56 1.5
>   @@ -15,7 +15,6 @@
>    {
>        protected Target target;
>        protected String description;
>   -    protected String taskName;
>        protected String taskType;
>        protected RuntimeConfigurable wrapper;
>    
>   @@ -40,16 +39,6 @@
>            this.target = target;
>        }
>    
>   -    /**
>   -     * Set the name to use in logging messages.
>   -     *
>   -     * @param name the name to use in logging messages.
>   -     */
>   -    public void setTaskName( String name )
>   -    {
>   -        this.taskName = name;
>   -    }
>   -
>        public String getDescription()
>        {
>            return description;
>   @@ -74,19 +63,9 @@
>        {
>            if( wrapper == null )
>            {
>   -            wrapper = new RuntimeConfigurable( this, getTaskName() );
>   +            wrapper = new RuntimeConfigurable( this, getName() );
>            }
>            return wrapper;
>   -    }
>   -
>   -    /**
>   -     * Get the name to use in logging messages.
>   -     *
>   -     * @return the name to use in logging messages.
>   -     */
>   -    public String getTaskName()
>   -    {
>   -        return taskName;
>        }
>    
>        /**
>   
>   
>   
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


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