Browse Source

Some javadoc'ing

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274869 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 22 years ago
parent
commit
6e4e93280e
2 changed files with 26 additions and 4 deletions
  1. +15
    -4
      src/main/org/apache/tools/ant/launch/Locator.java
  2. +11
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDefBase.java

+ 15
- 4
src/main/org/apache/tools/ant/launch/Locator.java View File

@@ -68,12 +68,19 @@ import java.text.StringCharacterIterator;
* @author Conor MacNeill
* @since Ant 1.6
*/
public class Locator {
public final class Locator {
/**
* Not instantiable
*/
private Locator() {
}

/**
* Find the directory or jar file the class has been loaded from.
*
* @return null if we cannot determine the location.
* @param c the class whose location is required.
* @return the file or jar with the class or null if we cannot
* determine the location.
*
* @since Ant 1.6
*/
@@ -83,9 +90,13 @@ public class Locator {
}

/**
* Find the directory or a give resource has been loaded from.
* Find the directory or jar a give resource has been loaded from.
*
* @param c the classloader to be consulted for the source
* @param resource the resource whose location is required.
*
* @return null if we cannot determine the location.
* @return the file with the resource source or null if
* we cannot determine the location.
*
* @since Ant 1.6
*/


+ 11
- 0
src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDefBase.java View File

@@ -102,6 +102,11 @@ public class ScriptDefBase extends Task implements DynamicConfigurator {
return definition;
}

/**
* Create a nested element
*
* @param name the nested element name
*/
public Object createDynamicElement(String name) {
List nestedElementList = (List) nestedElementMap.get(name);
if (nestedElementList == null) {
@@ -113,6 +118,12 @@ public class ScriptDefBase extends Task implements DynamicConfigurator {
return element;
}

/**
* Set a task attribute
*
* @param name the attribute name.
* @param value the attribute's string value
*/
public void setDynamicAttribute(String name, String value) {
ScriptDef definition = getScript();
if (!definition.isAttributeSupported(name)) {


Loading…
Cancel
Save