public final class JkClasspath
extends java.lang.Object
implements java.lang.Iterable<java.nio.file.Path>
class path
.entry
.jar
file either a
folder
.entry
, though they
won't contain any classes.Modifier and Type | Method and Description |
---|---|
JkClasspath |
and(java.lang.Iterable<java.nio.file.Path> paths)
Returns a
JkClasspath made of, in the order, the entries of
this one plus the specified ones. |
JkClasspath |
and(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... others)
See
and(Iterable) |
JkClasspath |
andPrepending(java.lang.Iterable<java.nio.file.Path> paths)
Returns a
JkClasspath made of, in the order, the specified
entries plus the entries of this one. |
JkClasspath |
andPrepending(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... others)
|
java.util.List<java.nio.file.Path> |
entries()
Returns each entries making this
classpath . |
boolean |
equals(java.lang.Object o) |
java.nio.file.Path |
getEntryContainingClass(java.lang.String className)
Returns the first entry of this
classpath containing the given class. |
int |
hashCode() |
java.util.Iterator<java.nio.file.Path> |
iterator() |
static JkClasspath |
of() |
static JkClasspath |
of(java.lang.Iterable<java.nio.file.Path> paths)
Creates a
JkClasspath form specified file entries. |
static JkClasspath |
of(java.nio.file.Path path1,
java.nio.file.Path path2,
java.nio.file.Path... others)
Creates a
JkClasspath form specified file entries. |
static JkClasspath |
ofCurrentRuntime()
Returns the current classpath as given by
System.getProperty("java.class.path") . |
java.net.URL[] |
toArrayOfUrl()
Returns this classpath as an array of URL.
|
java.lang.String |
toString() |
public static JkClasspath of(java.lang.Iterable<java.nio.file.Path> paths)
JkClasspath
form specified file entries.paths
- As Path
class implements Iterable
the argument can be a single Path
instance, if so it will be interpreted as a list containing a single element which is this argument.public static JkClasspath of()
public static JkClasspath of(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... others)
JkClasspath
form specified file entries.public static JkClasspath ofCurrentRuntime()
System.getProperty("java.class.path")
.public java.util.List<java.nio.file.Path> entries()
classpath
.public java.util.Iterator<java.nio.file.Path> iterator()
iterator
in interface java.lang.Iterable<java.nio.file.Path>
public java.net.URL[] toArrayOfUrl()
public java.nio.file.Path getEntryContainingClass(java.lang.String className)
classpath
containing the given class.public JkClasspath andPrepending(java.lang.Iterable<java.nio.file.Path> paths)
JkClasspath
made of, in the order, the specified
entries plus the entries of this one.paths
- As Path
class implements Iterable
the argument can be a single Path
instance, if so it will be interpreted as a list containing a single element which is this argument.public JkClasspath and(java.lang.Iterable<java.nio.file.Path> paths)
JkClasspath
made of, in the order, the entries of
this one plus the specified ones.paths
- As Path
class implements Iterable
the argument can be a single Path
instance, if so it will be interpreted as a list containing a single element which is this argument.public JkClasspath and(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... others)
and(Iterable)
public JkClasspath andPrepending(java.nio.file.Path path1, java.nio.file.Path path2, java.nio.file.Path... others)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object