Class ModuleLoader

java.lang.Object
org.basex.query.util.pkg.ModuleLoader

public final class ModuleLoader extends Object
Module loader.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Details

    • ModuleLoader

      public ModuleLoader(Context context)
      Constructor.
      Parameters:
      context - database context
  • Method Details

    • close

      public void close()
      Closes opened jar files, and calls close method of QueryModule instances implementing QueryResource.
    • 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 uri
      qp - query parser
      ii - 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
    • findModule

      public Object findModule(String clz)
      Returns an instance of the specified Java module class.
      Parameters:
      clz - class to be found
      Returns:
      instance or null