From a93a10a8abff51c061590b3ba3645b594af8b55b Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Mon, 25 Feb 2002 17:59:09 +0000 Subject: [PATCH] JavaDoc comments. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271548 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/TaskAdapter.java | 36 +++++++++++++------ 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/src/main/org/apache/tools/ant/TaskAdapter.java b/src/main/org/apache/tools/ant/TaskAdapter.java index 273fa0689..06b516220 100644 --- a/src/main/org/apache/tools/ant/TaskAdapter.java +++ b/src/main/org/apache/tools/ant/TaskAdapter.java @@ -56,28 +56,35 @@ package org.apache.tools.ant; 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 null. + * @param project Project to log warnings/errors to. + * Must not be null. + * + * @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 @@ public class TaskAdapter extends Task { } /** - * Do the execution. + * Executes the proxied task. */ public void execute() throws BuildException { Method setProjectM = null; @@ -147,12 +154,19 @@ public class TaskAdapter extends Task { } /** - * Set the target object class + * Sets the target object to proxy for. + * + * @param o The target object. Must not be null. */ 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 ; }