gnu.expr
Class ModuleManager
public class ModuleManager
extends java.lang.Object
A database of known modules as represented by
ModuleInfo
..
Current there is only a single global instanceof
ModuleManager
;
in the future each different "applications" may have their own.
LAST_MODIFIED_CACHE_TIME
public static final long LAST_MODIFIED_CACHE_TIME
lastModifiedCacheTime
public long lastModifiedCacheTime
Number millseconds before we re-check file's modified time.
clear
public void clear()
Reset the set of known modules.
findWithClassName
public ModuleInfo findWithClassName(String className)
findWithSourcePath
public ModuleInfo findWithSourcePath(String sourcePath)
findWithSourcePath
public ModuleInfo findWithSourcePath(Path sourceAbsPath,
String sourcePath)
getCompilationDirectory
public String getCompilationDirectory()
getInstance
public static ModuleManager getInstance()
For now assumes a single global ModuleManager.
Later, might have multiple managers.
loadPackageInfo
public void loadPackageInfo(String packageName)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
Search for and if needed load the
ModuleSet
for a package.
register
public void register(String moduleClass,
String moduleSource,
String moduleUri)
Called by compiler-generated code.
The compiler generates in each package a class that extends
ModuleSet
, and that contains a
ModuleSet.register(ModuleManager)
method that calls
back to this method. This method then registers the specified module.
searchWithClassName
public ModuleInfo searchWithClassName(String className)
setCompilationDirectory
public void setCompilationDirectory(String path)