public class Classpath
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.List<java.nio.file.Path> |
paths |
Constructor and Description |
---|
Classpath(java.lang.String... paths)
Constructs a Classpath with the given initial parts.
|
Modifier and Type | Method and Description |
---|---|
Classpath |
path(java.io.File file)
Adds the given path to the Classpath.
|
Classpath |
path(java.nio.file.Path path)
Adds the given path to the Classpath.
|
Classpath |
path(java.lang.String path)
Adds the given path to the Classpath.
|
Classpath |
paths(java.nio.file.Path... paths)
Adds all the given paths to the Classpath.
|
java.lang.String |
toString()
Converts this Classpath to a String by joining the paths using the File.separator.
|
java.lang.String |
toString(java.lang.String prefix)
Converts this Classpath to a String by joining the paths using the File.separator and adding the prefix to the
start.
|
java.net.URLClassLoader |
toURLClassLoader() |
public Classpath(java.lang.String... paths)
paths
- The paths to add to the Classpath on construction.public Classpath path(java.lang.String path)
path
- The path to add.public Classpath path(java.nio.file.Path path)
path
- The path to add.public Classpath path(java.io.File file)
file
- The file to add.public Classpath paths(java.nio.file.Path... paths)
paths
- The paths to add to the Classpath.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String prefix)
prefix
- The prefix of the String (usually '-classpath ').public java.net.URLClassLoader toURLClassLoader() throws java.lang.IllegalStateException
java.lang.IllegalStateException