Browse Source

Moved inner class to be a top level class

Moved toURL from Path to PathUtils


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270806 13f79535-47bb-0310-9956-ffa450edef68
remotes/1755091494694318907/tmp_89683e39ec2d4635aa87fd3370941c109d9d7507
Peter Donald 23 years ago
parent
commit
04ce488e76
4 changed files with 76 additions and 56 deletions
  1. +2
    -28
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
  2. +36
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/FileDir.java
  3. +2
    -28
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java
  4. +36
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/FileDir.java

+ 2
- 28
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java View File

@@ -15,6 +15,7 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;

/**
* Will set the given property if the requested resource is available at
@@ -24,7 +25,6 @@ import org.apache.tools.ant.types.Path;
* stefano@apache.org</a>
* @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
*/

public class Available
extends Task
implements Condition
@@ -123,7 +123,7 @@ public class Available

if( m_classpath != null )
{
final URL[] urls = m_classpath.toURLs();
final URL[] urls = PathUtil.toURLs( m_classpath );
m_classLoader = new URLClassLoader( urls );
}

@@ -342,30 +342,4 @@ public class Available
return m_classLoader;
}
}

public static class FileDir extends EnumeratedAttribute
{

private final static String[] values = {"file", "dir"};

public String[] getValues()
{
return values;
}

public boolean isDir()
{
return "dir".equalsIgnoreCase( getValue() );
}

public boolean isFile()
{
return "file".equalsIgnoreCase( getValue() );
}

public String toString()
{
return getValue();
}
}
}

+ 36
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/FileDir.java View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.ant.taskdefs;

import org.apache.tools.ant.types.EnumeratedAttribute;

public class FileDir
extends EnumeratedAttribute
{
private final static String[] values = {"file", "dir"};

public String[] getValues()
{
return values;
}

public boolean isDir()
{
return "dir".equalsIgnoreCase( getValue() );
}

public boolean isFile()
{
return "file".equalsIgnoreCase( getValue() );
}

public String toString()
{
return getValue();
}
}

+ 2
- 28
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java View File

@@ -15,6 +15,7 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.condition.Condition;
import org.apache.tools.ant.types.EnumeratedAttribute;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;

/**
* Will set the given property if the requested resource is available at
@@ -24,7 +25,6 @@ import org.apache.tools.ant.types.Path;
* stefano@apache.org</a>
* @author <a href="mailto:umagesh@apache.org">Magesh Umasankar</a>
*/

public class Available
extends Task
implements Condition
@@ -123,7 +123,7 @@ public class Available

if( m_classpath != null )
{
final URL[] urls = m_classpath.toURLs();
final URL[] urls = PathUtil.toURLs( m_classpath );
m_classLoader = new URLClassLoader( urls );
}

@@ -342,30 +342,4 @@ public class Available
return m_classLoader;
}
}

public static class FileDir extends EnumeratedAttribute
{

private final static String[] values = {"file", "dir"};

public String[] getValues()
{
return values;
}

public boolean isDir()
{
return "dir".equalsIgnoreCase( getValue() );
}

public boolean isFile()
{
return "file".equalsIgnoreCase( getValue() );
}

public String toString()
{
return getValue();
}
}
}

+ 36
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/FileDir.java View File

@@ -0,0 +1,36 @@
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.tools.ant.taskdefs;

import org.apache.tools.ant.types.EnumeratedAttribute;

public class FileDir
extends EnumeratedAttribute
{
private final static String[] values = {"file", "dir"};

public String[] getValues()
{
return values;
}

public boolean isDir()
{
return "dir".equalsIgnoreCase( getValue() );
}

public boolean isFile()
{
return "file".equalsIgnoreCase( getValue() );
}

public String toString()
{
return getValue();
}
}

Loading…
Cancel
Save