From 84ba746f0b98a60df954ea6288accb0b1f040199 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Fri, 21 Jan 2005 16:37:51 +0000 Subject: [PATCH] javadoc git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277421 13f79535-47bb-0310-9956-ffa450edef68 --- .../tools/ant/util/facade/FacadeTaskHelper.java | 14 ++++++++++---- .../facade/ImplementationSpecificArgument.java | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java b/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java index fe553248d..aef2e4bf3 100644 --- a/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java +++ b/src/main/org/apache/tools/ant/util/facade/FacadeTaskHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2004 The Apache Software Foundation + * Copyright 2002-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -62,7 +62,7 @@ public class FacadeTaskHelper { /** * @param defaultValue The default value for the implementation. * Must not be null. - * @param magicValue the value of a magic property that may hold a user + * @param magicValue the value of a magic property that may hold a user. * choice. May be null. */ public FacadeTaskHelper(String defaultValue, String magicValue) { @@ -72,6 +72,7 @@ public class FacadeTaskHelper { /** * Used to set the value of the magic property. + * @param magicValue the value of a magic property that may hold a user. */ public void setMagicValue(String magicValue) { this.magicValue = magicValue; @@ -79,6 +80,7 @@ public class FacadeTaskHelper { /** * Used for explicit user choices. + * @param userChoice the explicitly chosen implementation. */ public void setImplementation(String userChoice) { this.userChoice = userChoice; @@ -86,6 +88,7 @@ public class FacadeTaskHelper { /** * Retrieves the implementation. + * @return the implementation. */ public String getImplementation() { return userChoice != null ? userChoice @@ -94,7 +97,8 @@ public class FacadeTaskHelper { } /** - * Retrieves the explicit user choice + * Retrieves the explicit user choice. + * @return the explicit user choice. */ public String getExplicitChoice() { return userChoice; @@ -102,6 +106,7 @@ public class FacadeTaskHelper { /** * Command line argument. + * @param arg an argument to add. */ public void addImplementationArgument(ImplementationSpecificArgument arg) { args.addElement(arg); @@ -110,6 +115,7 @@ public class FacadeTaskHelper { /** * Retrieves the command line arguments enabled for the current * facade implementation. + * @return an array of command line arguements. */ public String[] getArgs() { Vector tmp = new Vector(args.size()); @@ -129,7 +135,7 @@ public class FacadeTaskHelper { /** * Tests whether the implementation has been chosen by the user * (either via a magic property or explicitly. - * + * @return true if magic or user choice has be set. * @since Ant 1.5.2 */ public boolean hasBeenSet() { diff --git a/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java b/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java index 928c84a2e..5fcad39e7 100644 --- a/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java +++ b/src/main/org/apache/tools/ant/util/facade/ImplementationSpecificArgument.java @@ -1,5 +1,5 @@ /* - * Copyright 2002,2004 The Apache Software Foundation + * Copyright 2002,2004-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,14 +30,27 @@ import org.apache.tools.ant.types.Commandline; public class ImplementationSpecificArgument extends Commandline.Argument { private String impl; + /** Constructor for ImplementationSpecificArgument. */ public ImplementationSpecificArgument() { super(); } + /** + * Set the implementation this argument is for. + * @param impl the implementation this command line argument is for. + */ public void setImplementation(String impl) { this.impl = impl; } + /** + * Return the parts this Argument consists of, if the + * implementation matches the chosen implementation. + * @see Commandline.Argument#getParts() + * @param chosenImpl the implementation to check against. + * @return the parts if the implemention matches or an zero length + * array if not. + */ public final String[] getParts(String chosenImpl) { if (impl == null || impl.equals(chosenImpl)) { return super.getParts();