Package org.apache.sling.maven.jspc

## Class TrackingClassLoader

- java.lang.Object
- - java.lang.ClassLoader
  - - java.security.SecureClassLoader
    - - java.net.URLClassLoader
      - - org.apache.sling.maven.jspc.TrackingClassLoader

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

    public class TrackingClassLoader
    extends URLClassLoader

Classloader that tracks which classes are loaded.

### Constructor Summary

Constructors
`TrackingClassLoader​(URL[] urls, ClassLoader parent)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected Class<?>` `findClass​(String name)`
`URL` `findResource​(String name)`
`Set<String>` `getClassNames()` Returns the loaded classes.
`Set<String>` `getPackageNames()` Returns the package names of the loaded classes.
`URL` `getResource​(String name)`
`Class<?>` `loadClass​(String name)`
`Class<?>` `loadClass​(String name, boolean resolve)`

### Methods inherited from class java.net.URLClassLoader

`addURL, close, definePackage, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance`

### Methods inherited from class java.security.SecureClassLoader

`defineClass, defineClass`

### Methods inherited from class java.lang.ClassLoader

`clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TrackingClassLoader

    public TrackingClassLoader​(URL[] urls,
                               ClassLoader parent)

### Method Detail

#### getClassNames

    public Set<String> getClassNames()

Returns the loaded classes.

Returns:
  the set of class names.

#### getPackageNames

    public Set<String> getPackageNames()

Returns the package names of the loaded classes.

Returns:
  the set of package names.

#### loadClass

    public Class<?> loadClass​(String name)
                       throws ClassNotFoundException

Overrides:
  `loadClass` in class `ClassLoader`
Throws:
  `ClassNotFoundException`
See Also:
  `ClassLoader.loadClass(java.lang.String)`

#### loadClass

    public Class<?> loadClass​(String name,
                              boolean resolve)
                       throws ClassNotFoundException

Overrides:
  `loadClass` in class `ClassLoader`
Throws:
  `ClassNotFoundException`
See Also:
  `ClassLoader.loadClass(java.lang.String,boolean)`

#### findClass

    protected Class<?> findClass​(String name)
                          throws ClassNotFoundException

Overrides:
  `findClass` in class `URLClassLoader`
Throws:
  `ClassNotFoundException`

#### getResource

    public URL getResource​(String name)

Overrides:
  `getResource` in class `ClassLoader`

#### findResource

    public URL findResource​(String name)

Overrides:
  `findResource` in class `URLClassLoader`