Browse Source

convenience constructor

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@677352 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 17 years ago
parent
commit
4716be40f9
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      src/main/org/apache/tools/ant/types/resources/FileResource.java

+ 12
- 2
src/main/org/apache/tools/ant/types/resources/FileResource.java View File

@@ -69,6 +69,17 @@ public class FileResource extends Resource implements Touchable, FileProvider,
setFile(f);
}

/**
* Create a new FileResource.
* @param p Project
* @param f File represented
* @since Ant 1.8
*/
public FileResource(Project p, File f) {
setProject(p);
setFile(f);
}

/**
* Constructor for Ant attribute introspection.
* @param p the Project against which to resolve <code>s</code>.
@@ -76,8 +87,7 @@ public class FileResource extends Resource implements Touchable, FileProvider,
* @see org.apache.tools.ant.IntrospectionHelper
*/
public FileResource(Project p, String s) {
this(p.resolveFile(s));
setProject(p);
this(p, p.resolveFile(s));
}

/**


Loading…
Cancel
Save