Package gnu.expr
Class ModuleInfo
- java.lang.Object
-
- gnu.expr.ModuleInfo
-
public class ModuleInfo extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringclassNameName of class that implements module.longlastCheckedTimelonglastModifiedTimeLast time the source file was modified.java.lang.StringsourcePathLocation of source for module, if known.
-
Constructor Summary
Constructors Constructor Description ModuleInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static gnu.kawa.io.PathabsPath(java.lang.String path)voidaddDependency(ModuleInfo dep)booleancheckCurrent(ModuleManager manager, long now)Check if this module and its dependencies are up-to-dete.voidcleanupAfterCompilation()voidclearClass()static ModuleInfofind(ClassType type)static ModuleInfofindFromInstance(java.lang.Object instance)static ModuleInfofindWithClassName(java.lang.String className)java.lang.StringgetClassName()ClassTypegetClassType()CompilationgetCompilation()java.lang.ObjectgetInstance()java.lang.ClassgetModuleClass()java.lang.ClassgetModuleClassRaw()ModuleExpgetModuleExp()ModuleExpgetModuleExpRaw()java.lang.StringgetNamespaceUri()The namespace URI associated with this module, ornull.java.lang.ClassgetOldModuleClass()java.lang.ObjectgetRunInstance()gnu.kawa.io.PathgetSourceAbsPath()java.lang.StringgetSourceAbsPathname()intgetState()voidloadByStages(int wantedState)booleanloadEager(int wantedState)Eagerly process the module and dependencies.static voidregister(java.lang.Object instance)voidsetClassName(java.lang.String name)voidsetCompilation(Compilation comp)voidsetModuleClass(java.lang.Class clas)voidsetNamespaceUri(java.lang.String uri)voidsetSourceAbsPath(gnu.kawa.io.Path path)ModuleExpsetupModuleExp()If module has LAZY_DECLARATIONS, fix that.java.lang.StringtoString()
-
-
-
Field Detail
-
className
protected java.lang.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.
-
sourcePath
public java.lang.String sourcePath
Location of source for module, if known. This can be any of 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. Avoid using, since "relative to current working directory" is unreliable if the working directory can change.
-
lastCheckedTime
public long lastCheckedTime
-
lastModifiedTime
public long lastModifiedTime
Last time the source file was modified. At least the last time we checked ...
-
-
Method Detail
-
getNamespaceUri
public java.lang.String getNamespaceUri()
The namespace URI associated with this module, ornull. This is null for Scheme modules, but non-null for XQuery modules.
-
setNamespaceUri
public void setNamespaceUri(java.lang.String uri)
-
getCompilation
public Compilation getCompilation()
-
setCompilation
public void setCompilation(Compilation comp)
-
cleanupAfterCompilation
public void cleanupAfterCompilation()
-
absPath
public static gnu.kawa.io.Path absPath(java.lang.String path)
-
getSourceAbsPath
public gnu.kawa.io.Path getSourceAbsPath()
-
setSourceAbsPath
public void setSourceAbsPath(gnu.kawa.io.Path path)
-
getSourceAbsPathname
public java.lang.String getSourceAbsPathname()
-
addDependency
public void addDependency(ModuleInfo dep)
-
getClassType
public ClassType getClassType()
-
getClassName
public java.lang.String getClassName()
-
setClassName
public void setClassName(java.lang.String name)
-
getModuleExpRaw
public ModuleExp getModuleExpRaw()
-
getModuleExp
public ModuleExp getModuleExp()
-
setupModuleExp
public ModuleExp setupModuleExp()
If module has LAZY_DECLARATIONS, fix that.
-
getModuleClass
public java.lang.Class getModuleClass() throws java.lang.ClassNotFoundException- Throws:
java.lang.ClassNotFoundException
-
getModuleClassRaw
public java.lang.Class getModuleClassRaw()
-
getOldModuleClass
public java.lang.Class getOldModuleClass()
-
setModuleClass
public void setModuleClass(java.lang.Class clas)
-
findFromInstance
public static ModuleInfo findFromInstance(java.lang.Object instance)
-
find
public static ModuleInfo find(ClassType type)
-
findWithClassName
public static ModuleInfo findWithClassName(java.lang.String className)
-
register
public static void register(java.lang.Object instance)
-
getInstance
public java.lang.Object getInstance()
-
getRunInstance
public java.lang.Object getRunInstance()
-
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.
-
clearClass
public void clearClass()
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-