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
-
-
Field Summary
Fields Modifier and Type Field Description protected MTStack
MTemplates
-
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 Module
getImportedModule(String alias)
Get a single imported module by alias or null if there is no such module.MIStack
getMInstances()
Modules (with their state) that have been imported and are keyed by alias.Module
getModule()
MTStack
getMTemplates()
Map<URI,Module>
getUsedModules()
Modules that the user has imported to the current scope.boolean
hasModule()
boolean
isImportMode()
boolean
isModuleState()
void
setImportMode(boolean importMode)
void
setMInstances(MIStack mInstances)
void
setModule(Module module)
void
setModuleState(boolean moduleState)
Flag this if it is used as the local state for a module.void
setMTemplates(MTStack MTemplates)
void
setUsedModules(Map<URI,Module> usedModules)
-
Methods inherited from class org.qdl_lang.state.AbstractState
debug, error, error, error, getIoInterface, getLibPath, getLogger, getMetaEvaluator, getModulePaths, getOperatorType, getOpEvaluator, getScriptArgs, getScriptArgStem, getScriptName, getScriptPaths, getScriptStack, getStateRegistry, getSuperState, getUuid, getVStack, hasLogging, hasScriptArgs, hasScriptName, hasSuperState, info, isDebugOn, isEnableLibrarySupport, isIntrinsic, isPrintUnicode, pathToList, setDebugOn, setEnableLibrarySupport, setIoInterface, setLibPath, setLibPath, 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:
-
-