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(File cachedir, Properties registry)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addJar(String jarfile, boolean cache)`
Append a jar file to the list of locations searched for java packages and java classes.
`void`
`addJarDir(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.
`Class`
`findClass(String pkg, String name)`
`Class`
`findClass(String pkg, String name, String reason)`
`void`
`notifyPackageImport(String pkg, String name)`
`boolean`
`packageExists(String pkg, 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 Details

### SysPackageManager

public SysPackageManager(File cachedir, Properties registry)

## Method Details

### addJar

public void addJar(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(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(String pkg, String name)

Overrides:
  `notifyPackageImport` in class `PackageManager`

### findClass

public Class findClass(String pkg, String name)

Overrides:
  `findClass` in class `PackageManager`

### findClass

public Class findClass(String pkg, String name, 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(String pkg, 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