# Class: com.pnfsoftware.jeb.util.reflect.ClasspathCollector

Collect classpaths and build a [ClassLoader](ClassLoader) object using those paths.

## Constructor: ClasspathCollector

Description: Create an empty classpath collector.

## Method: add
- parameter: `paths`, type: `java.lang.String`
- return type: `boolean`

Description: Add a path or series of paths to the collection of classpath entries recorded by this object.
parameter: paths: single or multiple paths. In the case of multiple paths, the paths must be            separated by the system separator, that is ':' on Unix systems, and ';' on Windows            systems
return: false if some error happened

## Method: addFromJar
- parameter: `file`, type: `java.io.File`
- return type: `boolean`

Description: Add a JAR file \(as well as additional in\-manifest located entries\) to the collection of classpath entries recorded by this object.
parameter: file: JAR file to add
return: false if some error happened

## Method: addSmart
- parameter: `dir`, type: `java.io.File`
- parameter: `cplist`, type: `java.lang.String`

Description: Add a series of comma\-separated entries to the collection of classpath entries recorded by this object. The entries may point to folders or JAR files.
parameter: dir: base directory used to resolve relative entries
parameter: cplist: comma\-separated list of classpath entries or wildcard patterns

## Method: createClassloader
- return type: `java.net.URLClassLoader`

Description: Create a classloader whose parent is the current classloader and whose classpath consists of all classpaths collected by this object
return: a URL class loader for the collected classpath

## Method: getClassloader
- parameter: `parentCl`, type: `java.lang.ClassLoader`
- return type: `java.net.URLClassLoader`

Description: Retrieve or create a classloader holding the classpaths stored by this object.
parameter: parentCl: optional parent class loader; if null, the collector's class loader is used
return: a URL class loader for the collected classpath

## Method: getUrls
- return type: `java.util.List<java.net.URL>`

Description: Get the collected classpath URLs.
return: an immutable view of the collected URLs

## Method: toString
- return type: `java.lang.String`


