gnu.expr

Class ModuleInfo

public class ModuleInfo extends Object

Field Summary
StringclassName
Name of class that implements module.
longlastCheckedTime
longlastModifiedTime
ClassmoduleClass
StringsourcePath
Location of source for module, if known.
Method Summary
static PathabsPath(String path)
voidaddDependency(ModuleInfo dep)
booleancheckCurrent(ModuleManager manager, long now)
Check if this module and its dependencies are up-to-dete.
voidclearClass()
static ModuleInfofind(String className)
static ModuleInfofind(Type type)
static ModuleInfofindFromInstance(Object instance)
ClassTypegetClassType()
CompilationgetCompilation()
ObjectgetInstance()
ClassgetModuleClass()
ModuleExpgetModuleExp()
StringgetNamespaceUri()
The namespace URI associated with this module, or {@code null}.
ObjectgetRunInstance()
PathgetSourceAbsPath()
StringgetSourceAbsPathname()
intgetState()
voidloadByStages(int wantedState)
booleanloadEager(int wantedState)
Eagerly process the module and dependencies.
ModuleInfonextModule()
Next element in list head by {@link ModuleManager#modules}.
static voidregister(Object instance)
voidsetCompilation(Compilation comp)
voidsetNamespaceUri(String uri)
voidsetSourceAbsPath(Path path)
ModuleExpsetupModuleExp()
If module has LAZY_DECLARATIONS, fix that.
StringtoString()

Field Detail

className

public String className
Name of class that implements module. Must be non-null unless we're currently compiling the module, in which case sourcePath and comp must both be non-null.

lastCheckedTime

public long lastCheckedTime

lastModifiedTime

public long lastModifiedTime

moduleClass

public Class moduleClass

sourcePath

public String sourcePath
Location of source for module, if known. This is an absolute URI, absolute filename, or filename relative to current working directory. Null if source not known; in that case className must be non-null.

Method Detail

absPath

public static Path absPath(String path)

addDependency

public void addDependency(ModuleInfo dep)

checkCurrent

public boolean checkCurrent(ModuleManager manager, long now)
Check if this module and its dependencies are up-to-dete. Only checks the sourcePath's modification time if it is at least ModifiedCacheTime since last time we checked. As as side-effects update lastModifiedTime and lastCheckedTime.

clearClass

public void clearClass()

find

public static ModuleInfo find(String className)

find

public static ModuleInfo find(Type type)

findFromInstance

public static ModuleInfo findFromInstance(Object instance)

getClassType

public ClassType getClassType()

getCompilation

public Compilation getCompilation()

getInstance

public Object getInstance()

getModuleClass

public Class getModuleClass()

getModuleExp

public ModuleExp getModuleExp()

getNamespaceUri

public String getNamespaceUri()
The namespace URI associated with this module, or {@code null}. This is null for Scheme modules, but non-null for XQuery modules.

getRunInstance

public Object getRunInstance()

getSourceAbsPath

public Path getSourceAbsPath()

getSourceAbsPathname

public String getSourceAbsPathname()

getState

public int getState()

loadByStages

public void loadByStages(int wantedState)

loadEager

public boolean loadEager(int wantedState)
Eagerly process the module and dependencies.

Returns: true on success; false if we were unable to because of an error or a cyclic dependency.

nextModule

public ModuleInfo nextModule()
Next element in list head by {@link ModuleManager#modules}.

register

public static void register(Object instance)

setCompilation

public void setCompilation(Compilation comp)

setNamespaceUri

public void setNamespaceUri(String uri)

setSourceAbsPath

public void setSourceAbsPath(Path path)

setupModuleExp

public ModuleExp setupModuleExp()
If module has LAZY_DECLARATIONS, fix that.

toString

public String toString()