org.python.core
Class SysPackageManager

java.lang.Object
  extended byorg.python.core.PackageManager
      extended byorg.python.core.CachedJarsPackageManager
          extended byorg.python.core.PathPackageManager
              extended byorg.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(File cachedir, Properties registry)
           
 
Method Summary
 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.PathPackageManager
addClassPath, addDirectory
 
Methods inherited from class org.python.core.CachedJarsPackageManager
addJarToPackages, addJarToPackages, addJarToPackages, addJarToPackages, loadResource, 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(File cachedir,
                         Properties registry)
Method Detail

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 overriden. Used by PyJavaPackage.__dir__() and PyJavaPackage.fillDir().

Overrides:
doDir in class PathPackageManager

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 overriden.

Overrides:
packageExists in class PathPackageManager