public abstract class PathPackageManager extends CachedJarsPackageManager
searchPath, and statically from a set of jars, like CachedJarsPackageManager.CachedJarsPackageManager.JarXEntry| Modifier and Type | Field and Description |
|---|---|
PyList |
searchPath |
loggertopLevelPackage| Constructor and Description |
|---|
PathPackageManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addClassPath(java.lang.String path)
Scan a Java class-path that may be a mixture of directory and JAR specifiers, and within each
path entry index the packages.
|
void |
addDirectory(java.io.File dir)
Add directory dir (if exists) to
searchPath. |
PyList |
doDir(PyJavaPackage jpkg,
boolean instantiate,
boolean exclpkgs)
Reports the specified package content names.
|
protected void |
doDir(PyList path,
PyList ret,
PyJavaPackage jpkg,
boolean instantiate,
boolean exclpkgs)
Helper for
doDir(PyJavaPackage,boolean,boolean). |
protected static boolean |
packageExists(PyList path,
java.lang.String pkg,
java.lang.String name)
Helper for
packageExists(String,String). |
boolean |
packageExists(java.lang.String pkg,
java.lang.String name)
Dynamically check if pkg.name exists as java pkg in the controlled hierarchy.
|
addJarToPackages, addJarToPackages, addJarToPackages, addJarToPackages, addModuleToPackages, comment, debug, deleteCacheFile, filterByAccess, filterByName, initCache, inOpenCacheFile, inOpenIndex, message, outCreateCacheFile, outOpenIndex, saveCache, splitString, useCacheDir, warningaddJar, addJarDir, basicDoDir, checkAccess, findClass, findClass, lookupName, makeJavaPackage, merge, notifyPackageImport, split, splitpublic PyList searchPath
protected static boolean packageExists(PyList path, java.lang.String pkg, java.lang.String name)
packageExists(String,String). Scans the directories in the given path for
package pkg.name. A directory with a matching name is considered to define a package if it
contains no Python (source or compiled), or contains a Java .class file (not compiled from
Python).protected void doDir(PyList path, PyList ret, PyJavaPackage jpkg, boolean instantiate, boolean exclpkgs)
doDir(PyJavaPackage,boolean,boolean). Scans for package jpkg content over
the directories in path. Add to ret the found classes/pkgs. Filter out classes using
CachedJarsPackageManager.filterByName(java.lang.String, boolean),CachedJarsPackageManager.filterByAccess(java.lang.String, int).public void addDirectory(java.io.File dir)
searchPath.addDirectory in class PackageManagerdir - A directory.public void addClassPath(java.lang.String path)
addDirectory(java.io.File) if a path entry refers to a dir,
CachedJarsPackageManager.addJarToPackages(java.io.File, boolean) with param cache true if the path entry
refers to a jar.public PyList doDir(PyJavaPackage jpkg, boolean instantiate, boolean exclpkgs)
PackageManagerPyJavaPackage.__dir__() and PyJavaPackage.fillDir().doDir in class PackageManagerjpkg - queried packageinstantiate - if true then instatiate reported names in package dictexclpkgs - exclude packages (just when instantiate is false)public boolean packageExists(java.lang.String pkg,
java.lang.String name)
PackageManagerpackageExists in class PackageManagerpkg - parent pkg namename - candidate name