public final class LuceeClassLoader
extends java.lang.ClassLoader
Constructor and Description |
---|
LuceeClassLoader(java.io.File jarFile,
java.lang.ClassLoader parent)
Creates a new JarClassLoader that will allow the loading
of classes stored in a jar file.
|
LuceeClassLoader(java.io.InputStream jar,
java.lang.ClassLoader parent,
boolean secured) |
Modifier and Type | Method and Description |
---|---|
java.lang.Class |
findClass(java.lang.String className)
Looks among the contents of the jar file (cached in memory)
and tries to find and define a class, given its name.
|
java.io.InputStream |
getResourceAsStream(java.lang.String name) |
java.lang.Class |
loadClass(java.lang.String name)
Loads the class with the specified name.
|
public LuceeClassLoader(java.io.File jarFile, java.lang.ClassLoader parent) throws java.io.IOException
jarFile
- the name of the jar fileparent
- parent class loaderjava.io.IOException
java.io.IOException
- an error happened while reading
the contents of the jar filepublic LuceeClassLoader(java.io.InputStream jar, java.lang.ClassLoader parent, boolean secured) throws java.io.IOException
java.io.IOException
public java.lang.Class findClass(java.lang.String className) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
className
- the name of the classjava.lang.ClassNotFoundException
- the jar file did not contain
a class named className
public java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
loadClass(name, false)
.loadClass
in class java.lang.ClassLoader
name
- the name of the classClass
objectjava.lang.ClassNotFoundException
- if the class was not foundpublic java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream
in class java.lang.ClassLoader
ClassLoader.getResourceAsStream(java.lang.String)