Package org.savantbuild.lang
Class Classpath
java.lang.Object
org.savantbuild.lang.Classpath
Models a Classpath.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds the given path to the Classpath.Adds the given path to the Classpath.Adds the given path to the Classpath.Adds all the given paths to the Classpath.toString()Converts this Classpath to a String by joining the paths using the File.separator.Converts this Classpath to a String by joining the paths using the File.separator and adding the prefix to the start.
-
Field Details
-
paths
-
-
Constructor Details
-
Classpath
Constructs a Classpath with the given initial parts.- Parameters:
paths- The paths to add to the Classpath on construction.
-
-
Method Details
-
path
Adds the given path to the Classpath.- Parameters:
path- The path to add.- Returns:
- This Classpath.
-
path
Adds the given path to the Classpath.- Parameters:
path- The path to add.- Returns:
- This Classpath.
-
path
Adds the given path to the Classpath.- Parameters:
file- The file to add.- Returns:
- This Classpath.
-
paths
Adds all the given paths to the Classpath.- Parameters:
paths- The paths to add to the Classpath.- Returns:
- This Classpath.
-
toString
Converts this Classpath to a String by joining the paths using the File.separator. If the Classpath is empty, this returns an empty String. -
toString
Converts this Classpath to a String by joining the paths using the File.separator and adding the prefix to the start. If the Classpath is empty, this returns an empty String.- Parameters:
prefix- The prefix of the String (usually '-classpath ').- Returns:
- The Classpath as a String or an empty String.
-
toURLClassLoader
- Throws:
IllegalStateException
-