org.sonar.java.bytecode.loader
Class SquidClassLoader
java.lang.Object
java.lang.ClassLoader
org.sonar.java.bytecode.loader.SquidClassLoader
- All Implemented Interfaces:
- Closeable
public class SquidClassLoader
- extends ClassLoader
- implements Closeable
Class loader, which is able to load classes from a list of JAR files and directories.
| Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SquidClassLoader
public SquidClassLoader(List<File> files)
- Parameters:
files - ordered list of files and directories from which to load classes and resources
findClass
protected Class findClass(String name)
throws ClassNotFoundException
- Overrides:
findClass in class ClassLoader
- Throws:
ClassNotFoundException
findResource
public URL findResource(String name)
- Overrides:
findResource in class ClassLoader
findResources
protected Enumeration<URL> findResources(String name)
throws IOException
- Overrides:
findResources in class ClassLoader
- Throws:
IOException
close
public void close()
- Closes this class loader, so that it can no longer be used to load new classes or resources.
Any classes or resources that are already loaded, are still accessible.
If class loader is already closed, then invoking this method has no effect.
- Specified by:
close in interface Closeable
Copyright © 2012-2014 SonarSource. All Rights Reserved.