hudson.util
Class ClasspathBuilder

java.lang.Object
  extended by 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
ClasspathBuilder()
           
 
Method Summary
 ClasspathBuilder add(File f)
          Adds a single directory or a jar file.
 ClasspathBuilder add(FilePath 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClasspathBuilder

public ClasspathBuilder()
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)

toString

public String toString()
Returns the string representation of the classpath.

Overrides:
toString in class Object


Copyright © 2004-2013. All Rights Reserved.