Package org.qdl_lang.state
Class FunctionState
- java.lang.Object
-
- org.qdl_lang.state.AbstractState
-
- org.qdl_lang.state.ModuleState
-
- org.qdl_lang.state.NamespaceAwareState
-
- org.qdl_lang.state.VariableState
-
- org.qdl_lang.state.FunctionState
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable
,edu.uiuc.ncsa.security.util.scripting.StateInterface
,Serializable
- Direct Known Subclasses:
State
public abstract class FunctionState extends VariableState
Created by Jeff Gaynor
on 2/2/20 at 6:48 AM- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.qdl_lang.state.VariableState
VariableState.CyclicalError, VariableState.ResolveState
-
-
Field Summary
-
Fields inherited from class org.qdl_lang.state.VariableState
EXTRINSIC_MARKER, int_regex, var_regex
-
Fields inherited from class org.qdl_lang.state.NamespaceAwareState
NS_DELIMITER, RESERVED_NAMESPACE
-
Fields inherited from class org.qdl_lang.state.ModuleState
MTemplates
-
Fields inherited from class org.qdl_lang.state.AbstractState
INTRINSIC_PREFIX, libPath, scriptArgs
-
-
Constructor Summary
Constructors Constructor Description FunctionState(VStack vStack, OpEvaluator opEvaluator, MetaEvaluator metaEvaluator, FStack fStack, MTStack mtStack, MIStack miStack, edu.uiuc.ncsa.security.core.util.MyLoggingFacade myLoggingFacade)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<FR_WithState>
getAllFunctionsByName(String name)
FStack
getExtrinsicFuncs()
FStack<? extends FTable>
getFTStack()
FStack
getIntrinsicFunctions()
List<String>
listAllDocumentation()
List<String>
listFunctionDoc(String fname, int argCount)
TreeSet<String>
listFunctions(boolean useCompactNotation, String regex, boolean includeModules, boolean showIntrinsic, boolean showExtrinsic)
Lists the functions for various components.protected TreeSet<String>
listFunctions(boolean useCompactNotation, String regex, boolean includeModules, boolean showIntrinsic, Set<XKey> processedAliases)
Since multiple aliases may be imported, just stop at the first on in the stack rather then trying to list all of them.List<String>
listModuleDoc(String fname)
This list the documentation templates by their preferred aliasvoid
putFunction(FunctionRecordInterface function)
Adds a function to the correct stack (intrinsic, extrinsic or regular.FR_WithState
resolveFunction(String name, int argCount, boolean checkForDuplicates)
FR_WithState
resolveFunction(Polyad polyad, boolean checkForDuplicates)
Convenience, just looks up name and arg countvoid
setFTStack(FStack<? extends FTable<? extends FKey,? extends FunctionRecordInterface>> fStack)
void
setIntrinsicFunctions(FStack intrinsicFunctions)
-
Methods inherited from class org.qdl_lang.state.VariableState
getExtrinsicVars, getIntrinsicVariables, getValue, getValue, gsrNSScalarOp, gsrNSStemOp, isDefined, isExtrinsic, isStem, listVariables, remove, resolveStemIndex, resolveStemIndex, setIntrinsicVariables, setValue, setValue
-
Methods inherited from class org.qdl_lang.state.NamespaceAwareState
getAlias, getUNQName
-
Methods inherited from class org.qdl_lang.state.ModuleState
getImportedModule, getMInstances, getModule, getMTemplates, getUsedModules, hasModule, isImportMode, isModuleState, setImportMode, setMInstances, setModule, setModuleState, setMTemplates, setUsedModules
-
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
-
-
-
-
Constructor Detail
-
FunctionState
public FunctionState(VStack vStack, OpEvaluator opEvaluator, MetaEvaluator metaEvaluator, FStack fStack, MTStack mtStack, MIStack miStack, edu.uiuc.ncsa.security.core.util.MyLoggingFacade myLoggingFacade)
-
-
Method Detail
-
setFTStack
public void setFTStack(FStack<? extends FTable<? extends FKey,? extends FunctionRecordInterface>> fStack)
-
putFunction
public void putFunction(FunctionRecordInterface function)
Adds a function to the correct stack (intrinsic, extrinsic or regular. To get the function, callresolveFunction(Polyad, boolean)
or one of its variants.- Parameters:
function
-
-
resolveFunction
public FR_WithState resolveFunction(Polyad polyad, boolean checkForDuplicates)
Convenience, just looks up name and arg count- Parameters:
polyad
-- Returns:
-
getAllFunctionsByName
public List<FR_WithState> getAllFunctionsByName(String name) throws CloneNotSupportedException
- Throws:
CloneNotSupportedException
-
resolveFunction
public FR_WithState resolveFunction(String name, int argCount, boolean checkForDuplicates)
-
listFunctions
public TreeSet<String> listFunctions(boolean useCompactNotation, String regex, boolean includeModules, boolean showIntrinsic, boolean showExtrinsic)
Lists the functions for various components.- Parameters:
useCompactNotation
-regex
-- Returns:
-
listFunctions
protected TreeSet<String> listFunctions(boolean useCompactNotation, String regex, boolean includeModules, boolean showIntrinsic, Set<XKey> processedAliases)
Since multiple aliases may be imported, just stop at the first on in the stack rather then trying to list all of them.- Parameters:
useCompactNotation
-regex
-includeModules
-showIntrinsic
-processedAliases
-- Returns:
-
listModuleDoc
public List<String> listModuleDoc(String fname)
This list the documentation templates by their preferred alias- Parameters:
fname
-- Returns:
-
getIntrinsicFunctions
public FStack getIntrinsicFunctions()
-
setIntrinsicFunctions
public void setIntrinsicFunctions(FStack intrinsicFunctions)
-
getExtrinsicFuncs
public FStack getExtrinsicFuncs()
-
-