ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsk...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant TaskAdapter.java
Date Mon, 25 Feb 2002 17:59:09 GMT
jskeet      02/02/25 09:59:09

  Modified:    src/main/org/apache/tools/ant TaskAdapter.java
  Log:
  JavaDoc comments.
  
  Revision  Changes    Path
  1.14      +25 -11    jakarta-ant/src/main/org/apache/tools/ant/TaskAdapter.java
  
  Index: TaskAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/TaskAdapter.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- TaskAdapter.java	19 Feb 2002 16:17:25 -0000	1.13
  +++ TaskAdapter.java	25 Feb 2002 17:59:09 -0000	1.14
  @@ -56,28 +56,35 @@
   
   import java.lang.reflect.Method;
   
  -
  -
   /**
  - *  Use introspection to "adapt" an arbitrary Bean ( not extending Task, but with similar
  - *  patterns).
  + * Uses introspection to "adapt" an arbitrary Bean which doesn't
  + * itself extend Task, but still contains an execute method and optionally 
  + * a setProject method.
    *
    * @author costin@dnt.ro
    */
   public class TaskAdapter extends Task {
   
  +    /** Object to act as a proxy for. */
       Object proxy;
       
       /**
  -     * Checks a class, whether it is suitable to be adapted by TaskAdapter.
  +     * Checks whether or not a class is suitable to be adapted by TaskAdapter.
        *
  -     * Checks conditions only, which are additionally required for a tasks
  -     * adapted by TaskAdapter. Thus, this method should be called by
  -     * {@link Project#checkTaskClass}.
  +     * This only checks conditions which are additionally required for 
  +     * tasks adapted by TaskAdapter. Thus, this method should be called by
  +     * Project.checkTaskClass.
        *
        * Throws a BuildException and logs as Project.MSG_ERR for
  -     * conditions, that will cause the task execution to fail.
  +     * conditions that will cause the task execution to fail.
        * Logs other suspicious conditions with Project.MSG_WARN.
  +     * 
  +     * @param taskClass Class to test for suitability. 
  +     *                  Must not be <code>null</code>.
  +     * @param project   Project to log warnings/errors to. 
  +     *                  Must not be <code>null</code>.
  +     * 
  +     * @see Project#checkTaskClass(Class)
        */
       public static void checkTaskClass(final Class taskClass, final Project project) {
           // don't have to check for interface, since then
  @@ -100,7 +107,7 @@
       }
       
       /**
  -     * Do the execution.
  +     * Executes the proxied task.
        */
       public void execute() throws BuildException {
           Method setProjectM = null;
  @@ -147,12 +154,19 @@
       }
       
       /**
  -     * Set the target object class
  +     * Sets the target object to proxy for.
  +     * 
  +     * @param o The target object. Must not be <code>null</code>.
        */
       public void setProxy(Object o) {
           this.proxy = o;
       }
   
  +    /**
  +     * Returns the target object being proxied.
  +     * 
  +     * @return the target proxy object
  +     */
       public Object getProxy() {
           return this.proxy ;
       }
  
  
  

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