URLResolver (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.extension.resolvers, class: URLResolver

# Class URLResolver

java.lang.Object
org.apache.tools.ant.taskdefs.optional.extension.resolvers.URLResolver

All Implemented Interfaces:
  `ExtensionResolver`

public class URLResolver extends Object implements ExtensionResolver
Resolver that just returns s specified location.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `URLResolver()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `File`
  `resolve(Extension extension, Project project)`
  Returns the file resolved from URL and directory
  `void`
  `setDestdir(File destdir)`
  Sets the destination directory
  `void`
  `setDestfile(File destfile)`
  Sets the destination file
  `void`
  `setUrl(URL url)`
  Sets the URL
  `String`
  `toString()`
  Returns a string representation of the URL

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### URLResolver

    public URLResolver()

- ## Method Details

  - ### setUrl

    public void setUrl(URL url)
    Sets the URL
    Parameters:
      `url` - the url

  - ### setDestfile

    public void setDestfile(File destfile)
    Sets the destination file
    Parameters:
      `destfile` - the destination file

  - ### setDestdir

    public void setDestdir(File destdir)
    Sets the destination directory
    Parameters:
      `destdir` - the destination directory

  - ### resolve

    public File resolve(Extension extension, Project project) throws BuildException
    Returns the file resolved from URL and directory
    Specified by:
      `resolve` in interface `ExtensionResolver`
    Parameters:
      `extension` - the extension
      `project` - the project
    Returns:
      file the file resolved
    Throws:
      `BuildException` - if the URL is invalid

  - ### toString

    public String toString()
    Returns a string representation of the URL
    Overrides:
      `toString` in class `Object`
    Returns:
      the string representation