gnu.expr
Class ModuleInfo

java.lang.Object
  extended by gnu.expr.ModuleInfo

public class ModuleInfo
extends java.lang.Object


Field Summary
 java.lang.String className
          Name of class that implements module.
 long lastCheckedTime
           
 long lastModifiedTime
           
 java.lang.Class moduleClass
           
 java.lang.String sourcePath
          Location of source for module, if known.
 
Constructor Summary
ModuleInfo()
           
 
Method Summary
static Path absPath(java.lang.String path)
           
 void addDependency(ModuleInfo dep)
           
 boolean checkCurrent(ModuleManager manager, long now)
          Check if this module and its dependencies are up-to-dete.
 void clearClass()
           
static ModuleInfo find(java.lang.String className)
           
static ModuleInfo find(Type type)
           
static ModuleInfo findFromInstance(java.lang.Object instance)
           
 ClassType getClassType()
           
 Compilation getCompilation()
           
 java.lang.Object getInstance()
           
 java.lang.Class getModuleClass()
           
 ModuleExp getModuleExp()
           
 java.lang.String getNamespaceUri()
          The namespace URI associated with this module, or null.
 java.lang.Object getRunInstance()
           
 Path getSourceAbsPath()
           
 java.lang.String getSourceAbsPathname()
           
 int getState()
           
 void loadByStages(int wantedState)
           
 boolean loadEager(int wantedState)
          Eagerly process the module and dependencies.
 ModuleInfo nextModule()
          Next element in list head by ModuleManager.modules.
static void register(java.lang.Object instance)
           
 void setCompilation(Compilation comp)
           
 void setNamespaceUri(java.lang.String uri)
           
 void setSourceAbsPath(Path path)
           
 ModuleExp setupModuleExp()
          If module has LAZY_DECLARATIONS, fix that.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

className

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


moduleClass

public java.lang.Class moduleClass

sourcePath

public java.lang.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.


lastCheckedTime

public long lastCheckedTime

lastModifiedTime

public long lastModifiedTime
Constructor Detail

ModuleInfo

public ModuleInfo()
Method Detail

nextModule

public ModuleInfo nextModule()
Next element in list head by ModuleManager.modules.


getNamespaceUri

public java.lang.String getNamespaceUri()
The namespace URI associated with this module, or null. 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)

absPath

public static Path absPath(java.lang.String path)

getSourceAbsPath

public Path getSourceAbsPath()

setSourceAbsPath

public void setSourceAbsPath(Path path)

getSourceAbsPathname

public java.lang.String getSourceAbsPathname()

addDependency

public void addDependency(ModuleInfo dep)

getClassType

public ClassType getClassType()

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

findFromInstance

public static ModuleInfo findFromInstance(java.lang.Object instance)

find

public static ModuleInfo find(java.lang.String className)

find

public static ModuleInfo find(Type type)

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:
toString in class java.lang.Object