Browse Source

since; ws

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@675996 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 17 years ago
parent
commit
b1a5b49896
6 changed files with 31 additions and 14 deletions
  1. +4
    -1
      src/main/org/apache/tools/ant/property/GetProperty.java
  2. +11
    -2
      src/main/org/apache/tools/ant/property/NullReturn.java
  3. +4
    -1
      src/main/org/apache/tools/ant/property/ParseNextProperty.java
  4. +2
    -2
      src/main/org/apache/tools/ant/property/ParseProperties.java
  5. +5
    -3
      src/main/org/apache/tools/ant/property/PropertyExpander.java
  6. +5
    -5
      src/main/org/apache/tools/ant/property/ResolvePropertyMap.java

+ 4
- 1
src/main/org/apache/tools/ant/property/GetProperty.java View File

@@ -17,7 +17,10 @@
*/
package org.apache.tools.ant.property;

/** Interface to a class (normally PropertyHelper) to get a property */
/**
* Interface to a class (normally PropertyHelper) to get a property.
* @since Ant 1.8.0
*/
public interface GetProperty {
/**
* Returns the value of a property if it is set.


+ 11
- 2
src/main/org/apache/tools/ant/property/NullReturn.java View File

@@ -17,7 +17,10 @@
*/
package org.apache.tools.ant.property;

/** Class to represent a null and to stop the chain of lookups. */
/**
* Class to represent a null and to stop the chain of lookups.
* @since Ant 1.8.0
*/
public final class NullReturn {
/** a value to use in a property helper to stop looking properties */
public static final NullReturn NULL = new NullReturn();
@@ -25,5 +28,11 @@ public final class NullReturn {
/** Private constructor */
private NullReturn() {
}
}

/**
* {@inheritDoc}
*/
public String toString() {
return String.valueOf(null);
}
}

+ 4
- 1
src/main/org/apache/tools/ant/property/ParseNextProperty.java View File

@@ -21,7 +21,10 @@ import java.text.ParsePosition;

import org.apache.tools.ant.Project;

/** Interface to parse a property */
/**
* Interface to parse a property.
* @since Ant 1.8.0
*/
public interface ParseNextProperty {
/**
* Get the current project.


+ 2
- 2
src/main/org/apache/tools/ant/property/ParseProperties.java View File

@@ -24,6 +24,7 @@ import org.apache.tools.ant.Project;

/**
* Parse properties using a collection of expanders.
* @since Ant 1.8.0
*/
public class ParseProperties implements ParseNextProperty {

@@ -37,8 +38,7 @@ public class ParseProperties implements ParseNextProperty {
* @param expanders a sequence of exapanders
* @param getProperty property resolver.
*/
public ParseProperties(
Project project, Collection expanders, GetProperty getProperty) {
public ParseProperties(Project project, Collection expanders, GetProperty getProperty) {
this.project = project;
this.expanders = expanders;
this.getProperty = getProperty;


+ 5
- 3
src/main/org/apache/tools/ant/property/PropertyExpander.java View File

@@ -21,7 +21,10 @@ import org.apache.tools.ant.PropertyHelper;

import java.text.ParsePosition;

/** Interface to a class (normally PropertyHelper) to get a property */
/**
* Interface to a class (normally PropertyHelper) to get a property.
* @since Ant 1.8.0
*/
public interface PropertyExpander extends PropertyHelper.Delegate {
/**
* Parse the next property name.
@@ -30,7 +33,6 @@ public interface PropertyExpander extends PropertyHelper.Delegate {
* @param parseNextProperty parse next property
* @return parsed String if any, else <code>null</code>.
*/
String parsePropertyName(
String s, ParsePosition pos, ParseNextProperty parseNextProperty);
String parsePropertyName(String s, ParsePosition pos, ParseNextProperty parseNextProperty);
}


+ 5
- 5
src/main/org/apache/tools/ant/property/ResolvePropertyMap.java View File

@@ -27,12 +27,13 @@ import org.apache.tools.ant.Project;
import org.apache.tools.ant.BuildException;

/**
* Class to resolve properties in a map.
* Class to resolve properties in a map.
* @since Ant 1.8.0
*/
public class ResolvePropertyMap implements GetProperty {
private final Set seen = new HashSet();
private final Set seen = new HashSet();
private final ParseProperties parseProperties;
private final GetProperty master;
private final GetProperty master;
private Map map;

/**
@@ -41,8 +42,7 @@ public class ResolvePropertyMap implements GetProperty {
* @param master the master property holder (usually PropertyHelper)
* @param expanders a collection of expanders (usually from PropertyHelper).
*/
public ResolvePropertyMap(
Project project, GetProperty master, Collection expanders) {
public ResolvePropertyMap(Project project, GetProperty master, Collection expanders) {
this.master = master;
this.parseProperties = new ParseProperties(project, expanders, this);
}


Loading…
Cancel
Save