public final class ModuleLoader
extends java.lang.Object
| Constructor and Description |
|---|
ModuleLoader(Context ctx)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addImport(byte[] uri,
InputInfo ii,
QueryParser qp)
Adds a package from the repository or a Java class.
|
void |
close()
Closes opened jar files.
|
java.lang.Class<?> |
findClass(java.lang.String clz)
Returns a reference to the specified class.
|
java.lang.Object |
findImport(java.lang.String clz)
Returns an instance of the specified Java module class.
|
static java.lang.String |
uri2path(java.lang.String uri)
Converts a URI to a directory path.
|
public ModuleLoader(Context ctx)
ctx - database contextpublic void close()
public boolean addImport(byte[] uri,
InputInfo ii,
QueryParser qp)
throws QueryException
uri - module uriii - input infoqp - query parserQueryException - query exceptionpublic java.lang.Class<?> findClass(java.lang.String clz)
throws java.lang.Throwable
clz - fully classified class namenulljava.lang.Throwable - any exception or error: ClassNotFoundException,
LinkageError or ExceptionInInitializerError.public java.lang.Object findImport(java.lang.String clz)
clz - class to be foundnullpublic static java.lang.String uri2path(java.lang.String uri)
Converts a URI to a directory path. The conversion is inspired by Zorba's URI transformation (http://www.zorba-xquery.com/html/documentation/2.2.0/zorba/uriresolvers):
null is returned if the URI has an invalid syntax.uri - namespace urinull