Package org.apache.ivy.core
Class RelativeUrlResolver
- java.lang.Object
-
- org.apache.ivy.core.RelativeUrlResolver
-
- Direct Known Subclasses:
ExecutionRelativeUrlResolver
,NormalRelativeUrlResolver
public abstract class RelativeUrlResolver extends java.lang.Object
Resolve an file or url relatively to its context.
-
-
Constructor Summary
Constructors Constructor Description RelativeUrlResolver()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.net.URL
getURL(java.net.URL context, java.lang.String url)
Resolve the url in the context of context.java.net.URL
getURL(java.net.URL context, java.lang.String file, java.lang.String url)
Resolve file or url path relatively to a context.
-
-
-
Method Detail
-
getURL
public abstract java.net.URL getURL(java.net.URL context, java.lang.String url) throws java.net.MalformedURLException
Resolve the url in the context of context.- Parameters:
context
- The URL of the resource containing the reference urlurl
- a relative or absolution url string- Returns:
- URL
- Throws:
java.net.MalformedURLException
- if url is wrong
-
getURL
public java.net.URL getURL(java.net.URL context, java.lang.String file, java.lang.String url) throws java.net.MalformedURLException
Resolve file or url path relatively to a context. file is considered first. If file is not defined, url will be considered.- Parameters:
context
- The URL of the resource containing the reference file or urlfile
- a relative or absolute pathurl
- a relative or absolution url string- Returns:
- the resulting url or null if failed and url are null.
- Throws:
java.net.MalformedURLException
- if url is wrong
-
-