Package org.python.core.packagecache

## Class SysPackageManager

- java.lang.Object
- - org.python.core.packagecache.PackageManager
  - - org.python.core.packagecache.CachedJarsPackageManager
    - - org.python.core.packagecache.PathPackageManager
      - - org.python.core.packagecache.SysPackageManager

-     public class SysPackageManager
      extends PathPackageManager

  System package manager. Used by org.python.core.PySystemState.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.python.core.packagecache.CachedJarsPackageManager

      `CachedJarsPackageManager.JarXEntry`

  - ### Field Summary

    - ### Fields inherited from class org.python.core.packagecache.PathPackageManager

      `searchPath`

    - ### Fields inherited from class org.python.core.packagecache.PackageManager

      `topLevelPackage`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SysPackageManager​(java.io.File cachedir, java.util.Properties registry)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addJar​(java.lang.String jarfile, boolean cache)` | Append a jar file to the list of locations searched for java packages and java classes.
    `void` | `addJarDir​(java.lang.String jdir, boolean cache)` | Append a directory to the list of directories searched for java packages and java classes.
    `PyList` | `doDir​(PyJavaPackage jpkg, boolean instantiate, boolean exclpkgs)` | Reports the specified package content names.
    `java.lang.Class` | `findClass​(java.lang.String pkg, java.lang.String name)` |
    `java.lang.Class` | `findClass​(java.lang.String pkg, java.lang.String name, java.lang.String reason)` |
    `void` | `notifyPackageImport​(java.lang.String pkg, java.lang.String name)` |
    `boolean` | `packageExists​(java.lang.String pkg, java.lang.String name)` | Dynamically check if pkg.name exists as java pkg in the controlled hierarchy.

    - ### Methods inherited from class org.python.core.packagecache.PathPackageManager

      `addClassPath, addDirectory`

    - ### Methods inherited from class org.python.core.packagecache.CachedJarsPackageManager

      `addJarToPackages, addJarToPackages, addJarToPackages, addJarToPackages, saveCache`

    - ### Methods inherited from class org.python.core.packagecache.PackageManager

      `lookupName, makeJavaPackage`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SysPackageManager

          public SysPackageManager​(java.io.File cachedir,
                                   java.util.Properties registry)

  - ### Method Detail

    - #### addJar

          public void addJar​(java.lang.String jarfile,
                             boolean cache)

      Description copied from class: `PackageManager`
      Append a jar file to the list of locations searched for java packages and java classes.
      Specified by:
        `addJar` in class `PackageManager`
      Parameters:
        `jarfile` - A directory name.

    - #### addJarDir

          public void addJarDir​(java.lang.String jdir,
                                boolean cache)

      Description copied from class: `PackageManager`
      Append a directory to the list of directories searched for java packages and java classes.
      Specified by:
        `addJarDir` in class `PackageManager`
      Parameters:
        `jdir` - A directory name.

    - #### notifyPackageImport

          public void notifyPackageImport​(java.lang.String pkg,
                                          java.lang.String name)

      Overrides:
        `notifyPackageImport` in class `PackageManager`

    - #### findClass

          public java.lang.Class findClass​(java.lang.String pkg,
                                           java.lang.String name)

      Overrides:
        `findClass` in class `PackageManager`

    - #### findClass

          public java.lang.Class findClass​(java.lang.String pkg,
                                           java.lang.String name,
                                           java.lang.String reason)

      Specified by:
        `findClass` in class `PackageManager`

    - #### doDir

          public PyList doDir​(PyJavaPackage jpkg,
                              boolean instantiate,
                              boolean exclpkgs)

      Description copied from class: `PackageManager`
      Reports the specified package content names. Should be overridden. Used by `PyJavaPackage.__dir__()` and `PyJavaPackage.fillDir()`.
      Overrides:
        `doDir` in class `PathPackageManager`
      Parameters:
        `jpkg` - queried package
        `instantiate` - if true then instatiate reported names in package dict
        `exclpkgs` - exclude packages (just when instantiate is false)
      Returns:
        resulting list of names (PyList of PyString)

    - #### packageExists

          public boolean packageExists​(java.lang.String pkg,
                                       java.lang.String name)

      Description copied from class: `PackageManager`
      Dynamically check if pkg.name exists as java pkg in the controlled hierarchy. Should be overridden.
      Overrides:
        `packageExists` in class `PathPackageManager`
      Parameters:
        `pkg` - parent pkg name
        `name` - candidate name
      Returns:
        true if pkg exists