Package org.basex.query.util.pkg
Class ModuleLoader
- java.lang.Object
-
- org.basex.query.util.pkg.ModuleLoader
-
public final class ModuleLoader extends Object
Module loader.- Author:
- BaseX Team 2005-22, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description ModuleLoader(Context context)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addImport(String uri, QueryParser qp, InputInfo ii)
Adds a package from the repository or a Java class.void
close()
Closes opened jar files, and calls close method ofQueryModule
instances implementingQueryResource
.Class<?>
findClass(String name)
Returns a reference to the specified class.Object
findModule(String clz)
Returns an instance of the specified Java module class.
-
-
-
Constructor Detail
-
ModuleLoader
public ModuleLoader(Context context)
Constructor.- Parameters:
context
- database context
-
-
Method Detail
-
close
public void close()
Closes opened jar files, and calls close method ofQueryModule
instances implementingQueryResource
.
-
addImport
public boolean addImport(String uri, QueryParser qp, InputInfo ii) throws QueryException
Adds a package from the repository or a Java class.- Parameters:
uri
- module uriqp
- query parserii
- input info- Returns:
- if the package has been found
- Throws:
QueryException
- query exception
-
findClass
public Class<?> findClass(String name) throws ClassNotFoundException
Returns a reference to the specified class.- Parameters:
name
- fully classified class name- Returns:
- found class
- Throws:
ClassNotFoundException
- class not found exception
-
-