Package org.qdl_lang.state
Class ModuleState
- java.lang.Object
-
- org.qdl_lang.state.AbstractState
-
- org.qdl_lang.state.ModuleState
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable,edu.uiuc.ncsa.security.util.scripting.StateInterface,Serializable
- Direct Known Subclasses:
NamespaceAwareState
public abstract class ModuleState extends AbstractState
Handles all the module related operations for the state.Created by Jeff Gaynor
on 1/31/22 at 7:26 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.qdl_lang.state.AbstractState
AbstractState.QDLStackTraceElement
-
-
Field Summary
Fields Modifier and Type Field Description protected MTStackMTemplates-
Fields inherited from class org.qdl_lang.state.AbstractState
INTRINSIC_PREFIX, libPath, scriptArgs
-
-
Constructor Summary
Constructors Constructor Description ModuleState(VStack vStack, OpEvaluator opEvaluator, MetaEvaluator metaEvaluator, MTStack MTemplates, MIStack mInstances, edu.uiuc.ncsa.security.core.util.MyLoggingFacade myLoggingFacade)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModulegetImportedModule(String alias)Get a single imported module by alias or null if there is no such module.MIStackgetMInstances()Modules (with their state) that have been imported and are keyed by alias.ModulegetModule()MTStackgetMTemplates()Map<URI,Module>getUsedModules()Modules that the user has imported to the current scope.booleanhasModule()booleanisImportMode()booleanisModuleState()voidsetImportMode(boolean importMode)voidsetMInstances(MIStack mInstances)voidsetModule(Module module)voidsetModuleState(boolean moduleState)Flag this if it is used as the local state for a module.voidsetMTemplates(MTStack MTemplates)voidsetUsedModules(Map<URI,Module> usedModules)-
Methods inherited from class org.qdl_lang.state.AbstractState
debug, error, error, error, getCompletionProvider, getIoInterface, getLibPath, getLibrarySupportMode, getLogger, getMetaEvaluator, getModulePaths, getOperatorType, getOpEvaluator, getScriptArgs, getScriptArgStem, getScriptName, getScriptPaths, getScriptStack, getStateRegistry, getSuperState, getUuid, getVStack, hasCompletionProvider, hasLogging, hasScriptArgs, hasScriptName, hasSuperState, info, isDebugOn, isEnableLibrarySupport, isIntrinsic, isPrintUnicode, pathToList, setCompletionProvider, setDebugOn, setEnableLibrarySupport, setIoInterface, setLibPath, setLibPath, setLibrarySupportMode, setLogger, setMetaEvaluator, setModulePaths, setModulePaths, setOpEvaluator, setPrintUnicode, setScriptArgs, setScriptArgStem, setScriptName, setScriptPaths, setScriptPaths, setScriptStack, setSuperState, setUuid, setvStack, warn
-
-
-
-
Field Detail
-
MTemplates
protected MTStack MTemplates
-
-
Constructor Detail
-
ModuleState
public ModuleState(VStack vStack, OpEvaluator opEvaluator, MetaEvaluator metaEvaluator, MTStack MTemplates, MIStack mInstances, edu.uiuc.ncsa.security.core.util.MyLoggingFacade myLoggingFacade)
-
-
Method Detail
-
setMTemplates
public void setMTemplates(MTStack MTemplates)
-
getMTemplates
public MTStack getMTemplates()
-
getMInstances
public MIStack getMInstances()
Modules (with their state) that have been imported and are keyed by alias.- Returns:
-
setMInstances
public void setMInstances(MIStack mInstances)
-
getImportedModule
public Module getImportedModule(String alias)
Get a single imported module by alias or null if there is no such module.- Parameters:
alias-- Returns:
-
isImportMode
public boolean isImportMode()
-
setImportMode
public void setImportMode(boolean importMode)
-
isModuleState
public boolean isModuleState()
-
setModuleState
public void setModuleState(boolean moduleState)
Flag this if it is used as the local state for a module. This is used to enforce local resolutions at runtime.- Parameters:
moduleState-
-
hasModule
public boolean hasModule()
-
getModule
public Module getModule()
-
setModule
public void setModule(Module module)
-
getUsedModules
public Map<URI,Module> getUsedModules()
Modules that the user has imported to the current scope. Note that this is mostly used for serializing a workspace: In particular, for Java modules, there is no other way than to serialize the module then re-use it on deserialization.- Returns:
-
-