Package org.jrd.backend.decompiling
Class ExpandableUrl
- java.lang.Object
-
- org.jrd.backend.decompiling.ExpandableUrl
-
public class ExpandableUrl extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExpandableUrl.MalformedMacroExpansion
static class
ExpandableUrl.MalformedURLToPath
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExpandableUrl
createFromPath(String path)
static ExpandableUrl
createFromStringUrl(String url)
String
getExpandedPath()
URL
getExpandedURL()
File
getFile()
String
getRawPath()
String
getRawURL()
protected static String
prependFileProtocol(String url)
There were many differences in file protocol handling between jdk8 and jdk11.String
toString()
static String
unifySlashes(String dir)
static String
unifySlashes(String dir, boolean prependSlash)
-
-
-
Method Detail
-
createFromPath
public static ExpandableUrl createFromPath(String path)
-
createFromStringUrl
public static ExpandableUrl createFromStringUrl(String url) throws ExpandableUrl.MalformedMacroExpansion
-
prependFileProtocol
protected static String prependFileProtocol(String url)
There were many differences in file protocol handling between jdk8 and jdk11. Especially on windows, Where redundant / could auto point to C:\ or simply kill the path Although this method shoul be of signature URL:(File), it was left as String String, as the slashes are making us mad- Parameters:
url
-- Returns:
-
getExpandedURL
public URL getExpandedURL() throws MalformedURLException
- Throws:
MalformedURLException
-
getRawURL
public String getRawURL()
-
getExpandedPath
public String getExpandedPath()
-
getRawPath
public String getRawPath()
-
getFile
public File getFile()
-
-