public class CodeLocations extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CodeLocations.InvalidCodeLocation |
| Constructor and Description |
|---|
CodeLocations() |
| Modifier and Type | Method and Description |
|---|---|
static URL |
codeLocationFromClass(Class<?> codeLocationClass)
Creates a code location URL from a class
|
static URL |
codeLocationFromPath(String filePath)
Creates a code location URL from a file path
|
static URL |
codeLocationFromURL(String url)
Creates a code location URL from a URL
|
static String |
getPathFromURL(URL url)
Get absolute path from URL objects starting with file:
This method takes care of decoding %-encoded chars, e.g.
|
public static URL codeLocationFromClass(Class<?> codeLocationClass)
codeLocationClass - the classCodeLocations.InvalidCodeLocation - if URL creation failspublic static URL codeLocationFromPath(String filePath)
filePath - the file pathCodeLocations.InvalidCodeLocation - if URL creation failspublic static URL codeLocationFromURL(String url)
url - the URL external formCodeLocations.InvalidCodeLocation - if URL creation failspublic static String getPathFromURL(URL url)
url - the file-URLCodeLocations.InvalidCodeLocation - if URL contains format errorsCopyright © 2003–2016. All rights reserved.