Package hudson.util
Class ClasspathBuilder
- java.lang.Object
-
- hudson.util.ClasspathBuilder
-
- All Implemented Interfaces:
Serializable
public class ClasspathBuilder extends Object implements Serializable
Used to build up an argument in the classpath format.- Since:
- 1.300
- Author:
- Kohsuke Kawaguchi
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClasspathBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClasspathBuilder
add(FilePath f)
Adds a single directory or a jar file.ClasspathBuilder
add(File f)
Adds a single directory or a jar file.ClasspathBuilder
add(String path)
Adds a single directory or a jar file.ClasspathBuilder
addAll(FilePath base, String glob)
Adds all the files that matches the given glob in the directory.ClasspathBuilder
addJarOf(Class c)
Adds a jar file that contains the given class.String
toString()
Returns the string representation of the classpath.
-
-
-
Method Detail
-
add
public ClasspathBuilder add(File f)
Adds a single directory or a jar file.
-
add
public ClasspathBuilder add(FilePath f)
Adds a single directory or a jar file.
-
add
public ClasspathBuilder add(String path)
Adds a single directory or a jar file.
-
addJarOf
public ClasspathBuilder addJarOf(Class c) throws IOException
Adds a jar file that contains the given class.- Throws:
IOException
- Since:
- 1.361
-
addAll
public ClasspathBuilder addAll(FilePath base, String glob) throws IOException, InterruptedException
Adds all the files that matches the given glob in the directory.- Throws:
IOException
InterruptedException
- See Also:
FilePath.list(String)
-
-