public final class LuceeClassLoader extends ClassLoader
Constructor and Description |
---|
LuceeClassLoader(File jarFile,
ClassLoader parent)
Creates a new JarClassLoader that will allow the loading
of classes stored in a jar file.
|
LuceeClassLoader(InputStream jar,
ClassLoader parent,
boolean secured) |
Modifier and Type | Method and Description |
---|---|
Class |
findClass(String className)
Looks among the contents of the jar file (cached in memory)
and tries to find and define a class, given its name.
|
InputStream |
getResourceAsStream(String name) |
Class |
loadClass(String name)
Loads the class with the specified name.
|
clearAssertionStatus, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus
public LuceeClassLoader(File jarFile, ClassLoader parent) throws IOException
jarFile
- the name of the jar fileparent
- parent class loaderIOException
IOException
- an error happened while reading
the contents of the jar filepublic LuceeClassLoader(InputStream jar, ClassLoader parent, boolean secured) throws IOException
IOException
public Class findClass(String className) throws ClassNotFoundException
findClass
in class ClassLoader
className
- the name of the classClassNotFoundException
- the jar file did not contain
a class named className
public Class loadClass(String name) throws ClassNotFoundException
loadClass(name, false)
.loadClass
in class ClassLoader
name
- the name of the classClass
objectClassNotFoundException
- if the class was not foundpublic InputStream getResourceAsStream(String name)
getResourceAsStream
in class ClassLoader
ClassLoader.getResourceAsStream(java.lang.String)
Copyright © 2015 Lucee