| Modifier and Type | Field and Description |
|---|---|
| private static final Pattern | DASH_VERSION
The Constant DASH_VERSION. |
| private static final Pattern | LEADING_DOTS
The Constant LEADING_DOTS. |
| private static final Pattern | NON_ALPHANUM
The Constant NON_ALPHANUM. |
| private static final Pattern | REPEATING_DOTS
The Constant REPEATING_DOTS. |
| private static final Pattern | TRAILING_DOTS
The Constant TRAILING_DOTS. |
| private static final int[] | UNIX_NON_PATH_SEPARATOR_COLON_POSITIONS
The position of the colon characters in the corresponding UNIX_NON_PATH_SEPARATORS array entry. |
| private static final String[] | UNIX_NON_PATH_SEPARATORS
On everything but Windows, where the path separator is ':', need to treat the colon in these substrings as non-separators, when at the beginning of the string or following a ':'. |
| public static final Pattern | URL_SCHEME_PATTERN
Check if a path has a URL scheme at the beginning. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static void | appendPathElt(final Object
the path element pathElt, final StringBuilder the buf buf)Append a path element to a buffer. |
| public static String | Returns: the class namethe classfile path classfilePath)Convert a classfile path to the corresponding class name. |
| public static String | Returns: the classfile paththe class name className)Convert a class name to the corresponding classfile path. |
| public static String | Returns: The automatic module name.The jar path. jarPath)Derive automatic module name from jar name, using this algorithm. |
| public static String | |
| public static String | Returns: The delimited path formed out of the path elements.The path elements. pathElts)Get a set of path elements as a string, from an array of objects (e.g. of String, File or URL type, whose toString() method will be called to get the path component), and return the path as a single string delineated with the standard path separator character. |
| public static String | Returns: The delimited path formed out of the path elements, after calling each of their toString() methods.The path elements. pathElts)Get a set of path elements as a string, from an array of objects (e.g. of String, File or URL type, whose toString() method will be called to get the path component), and return the path as a single string delineated with the standard path separator character. |
| public static String[] | Returns: The path element substrings.The path to split. pathStr, final ScanSpec the scan spec scanSpec)Split a path on File.pathSeparator (':' on Linux, ';' on Windows), but also allow for the use of URLs with protocol specifiers, e.g. "http://domain/jar1.jar:http://domain/jar2.jar". |
| public static String[] | Returns: The path element substrings.The path to split. pathStr, final char The separator char to use. separatorChar, final ScanSpec the scan spec scanSpec)Split a path on the given separator char. |
| DASH_VERSION | back to summary |
|---|---|
| private static final Pattern DASH_VERSION The Constant DASH_VERSION. | |
| LEADING_DOTS | back to summary |
|---|---|
| private static final Pattern LEADING_DOTS The Constant LEADING_DOTS. | |
| NON_ALPHANUM | back to summary |
|---|---|
| private static final Pattern NON_ALPHANUM The Constant NON_ALPHANUM. | |
| REPEATING_DOTS | back to summary |
|---|---|
| private static final Pattern REPEATING_DOTS The Constant REPEATING_DOTS. | |
| TRAILING_DOTS | back to summary |
|---|---|
| private static final Pattern TRAILING_DOTS The Constant TRAILING_DOTS. | |
| UNIX_NON_PATH_SEPARATOR_COLON_POSITIONS | back to summary |
|---|---|
| private static final int[] UNIX_NON_PATH_SEPARATOR_COLON_POSITIONS The position of the colon characters in the corresponding UNIX_NON_PATH_SEPARATORS array entry. | |
| UNIX_NON_PATH_SEPARATORS | back to summary |
|---|---|
| private static final String[] UNIX_NON_PATH_SEPARATORS On everything but Windows, where the path separator is ':', need to treat the colon in these substrings as non-separators, when at the beginning of the string or following a ':'. | |
| URL_SCHEME_PATTERN | back to summary |
|---|---|
| public static final Pattern URL_SCHEME_PATTERN Check if a path has a URL scheme at the beginning. Require at least 2 chars in a URL scheme, so that Windows drive designations don't get treated as URL schemes. | |
| JarUtils | back to summary |
|---|---|
| private JarUtils() Constructor. | |
| appendPathElt | back to summary |
|---|---|
| private static void appendPathElt(final Object pathElt, final StringBuilder buf) Append a path element to a buffer.
| |
| classfilePathToClassName | back to summary |
|---|---|
| public static String classfilePathToClassName(final String classfilePath) Convert a classfile path to the corresponding class name. | |
| classNameToClassfilePath | back to summary |
|---|---|
| public static String classNameToClassfilePath(final String className) Convert a class name to the corresponding classfile path. | |
| derivedAutomaticModuleName | back to summary |
|---|---|
| public static String derivedAutomaticModuleName(final String jarPath) Derive automatic module name from jar name, using this algorithm. | |
| leafName | back to summary |
|---|---|
| public static String leafName(final String path) Returns the leafname of a path, after first stripping off everything after the first '!', if present. | |
| pathElementsToPathStr | back to summary |
|---|---|
| public static String pathElementsToPathStr(final Object... pathElts) Get a set of path elements as a string, from an array of objects (e.g. of String, File or URL type, whose toString() method will be called to get the path component), and return the path as a single string delineated with the standard path separator character. | |
| pathElementsToPathStr | back to summary |
|---|---|
| public static String pathElementsToPathStr(final Iterable<?> pathElts) Get a set of path elements as a string, from an array of objects (e.g. of String, File or URL type, whose toString() method will be called to get the path component), and return the path as a single string delineated with the standard path separator character. | |
| smartPathSplit | back to summary |
|---|---|
| public static String[] smartPathSplit(final String pathStr, final ScanSpec scanSpec) Split a path on File.pathSeparator (':' on Linux, ';' on Windows), but also allow for the use of URLs with protocol specifiers, e.g. "http://domain/jar1.jar:http://domain/jar2.jar". | |
| smartPathSplit | back to summary |
|---|---|
| public static String[] smartPathSplit(final String pathStr, final char separatorChar, final ScanSpec scanSpec) Split a path on the given separator char. If the separator char is ':', also allow for the use of URLs with protocol specifiers, e.g. "http://domain/jar1.jar:http://domain/jar2.jar". | |