## org.python.core
Class SysPackageManager

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

public class SysPackageManager
extends PathPackageManager

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

Nested Class Summary

Nested classes inherited from class org.python.core.CachedJarsPackageManager
`CachedJarsPackageManager.JarXEntry`

Field Summary

Fields inherited from class org.python.core.PathPackageManager
`searchPath`

Fields inherited from class org.python.core.PackageManager
`topLevelPackage`

Constructor Summary
`SysPackageManager(java.io.File cachedir, java.util.Properties registry)`

Method Summary
`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.PathPackageManager
`addClassPath, addDirectory`

Methods inherited from class org.python.core.CachedJarsPackageManager
`addJarToPackages, addJarToPackages, addJarToPackages, addJarToPackages, saveCache`

Methods inherited from class org.python.core.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 overriden. 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 overriden.

  Overrides:
    `packageExists` in class `PathPackageManager`
  Parameters:
    `pkg` - parent pkg name
    `name` - candidate name
  Returns:
    true if pkg exists

Jython homepage