Package org.qdl_lang.evaluate
Class ModuleEvaluator
- java.lang.Object
- 
- org.qdl_lang.evaluate.AbstractEvaluator
- 
- org.qdl_lang.evaluate.ModuleEvaluator
 
 
- 
- All Implemented Interfaces:
- Serializable,- EvaluatorInterface
 
 public class ModuleEvaluator extends AbstractEvaluator Created by Jeff Gaynor 
 on 11/21/23 at 6:42 AM- See Also:
- Serialized Form
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.qdl_lang.evaluate.AbstractEvaluatorAbstractEvaluator.CommonKeyIterator, AbstractEvaluator.fPointer, AbstractEvaluator.fpResult
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringADD_LIB_ENTRIESstatic intADD_LIB_ENTRIES_TYPEstatic StringDROPstatic intDROP_TYPEstatic StringGET_DOCUMENTATIONstatic intGET_DOCUMENTATION_TYPEstatic StringGET_FUNCTIONSstatic intGET_FUNCTIONS_TYPEstatic StringGET_VARIABLESstatic intGET_VARIABLES_TYPEstatic StringIMPORTstatic StringIMPORT_STATE_ANYstatic intIMPORT_STATE_ANY_VALUEstatic StringIMPORT_STATE_NONEImported module has completey clean state, nothing from ambient statestatic intIMPORT_STATE_NONE_VALUEUsed if no state is shared, i.e.static StringIMPORT_STATE_SHAREImported module shares ambient state.static intIMPORT_STATE_SHARE_VALUEAmbient state used by module.static StringIMPORT_STATE_SNAPSHOTImported module gets snapshot of current ambient state, but is independent of it.static intIMPORT_STATE_SNAPSHOT_VALUEAm,bient state cloned and then added to module state.static intIMPORT_TYPEstatic StringJAVA_MODULE_LOADstatic intJAVA_MODULE_LOAD_TYPEstatic StringJAVA_MODULE_USEstatic intJAVA_MODULE_USE_TYPEstatic StringLOADstatic intLOAD_TYPEstatic StringLOADEDstatic intLOADED_TYPEstatic intMODULE_FUNCTION_BASE_VALUEstatic StringMODULE_NAMESPACEstatic StringRENAMEstatic intRENAME_TYPEstatic StringUSEstatic intUSE_TYPE- 
Fields inherited from class org.qdl_lang.evaluate.AbstractEvaluatorbigArgList, bigArgList0, FILE_OP_AUTO, FILE_OP_BINARY, FILE_OP_INPUT_STREAM, FILE_OP_TEXT_INI, FILE_OP_TEXT_STEM, FILE_OP_TEXT_STRING, FILE_OP_TEXT_WITHOUT_LIST_INI, fNames, MAX_ARG_COUNT
 - 
Fields inherited from interface org.qdl_lang.evaluate.EvaluatorInterfaceUNKNOWN_VALUE
 
- 
 - 
Constructor SummaryConstructors Constructor Description ModuleEvaluator()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FStackcloneIntrinsicFunctions(State state)protected VStackcloneIntrinsicVariables(State state)booleandispatch(Polyad polyad, State state)Does the actual evaluation of thePolyad.protected voiddoImport(Polyad polyad, State state)Eithjer import(string) - namespace import(string, mode) - mode is a string or integer returns the instance of the module.protected voiddoLoad(Polyad polyad, State state)Contract is that the type as an explicit argument is no longer required.protected voiddoUse(Polyad polyad, State state)protected StringgetClassPathFromToolPath(List<String> toolPath, State state)protected QDLStemgetDoc(Module m)protected QDLStemgetDoc(DyadicFunctionReferenceNode df)protected QDLStemgetDoc(QDLStem inStem)String[]getFunctionNames()static StringgetInheritanceMode(int x)static intgetInheritanceMode(String x)StringgetNamespace()intgetType(String name)- 
Methods inherited from class org.qdl_lang.evaluate.AbstractEvaluatorareAllBigDecimals, areAllBoolean, areAllLongs, areAllNumbers, areAllSets, areAllStems, areAllStrings, areAnyBigDecimals, areNoneStems, bdEquals, checkNull, checkNull, convertArgsToStem, evaluate, evaluate, finishExpr, getBigArgList, getBigArgList0, getCommonKeys, getFQFunctionNames, getFunctionReferenceNode, getFunctionReferenceNode, getOperator, getOrCreateStem, isBigDecimal, isBoolean, isBuiltInFunction, isFunctionRef, isLong, isNumber, isScalar, isSet, isStem, isStemList, isString, listFunctions, NEWgetOperator, OLDgetOperator, process1, process2, process2, process3, processSet1, processSet2, processSet2, processStem1, processStem2, processStem3, resolveResourceToFile, tempFname, toBD, toConstants, toStem
 
- 
 
- 
- 
- 
Field Detail- 
MODULE_NAMESPACEpublic static final String MODULE_NAMESPACE - See Also:
- Constant Field Values
 
 - 
MODULE_FUNCTION_BASE_VALUEpublic static final int MODULE_FUNCTION_BASE_VALUE - See Also:
- Constant Field Values
 
 - 
LOADpublic static final String LOAD - See Also:
- Constant Field Values
 
 - 
LOAD_TYPEpublic static final int LOAD_TYPE - See Also:
- Constant Field Values
 
 - 
IMPORTpublic static final String IMPORT - See Also:
- Constant Field Values
 
 - 
IMPORT_TYPEpublic static final int IMPORT_TYPE - See Also:
- Constant Field Values
 
 - 
USEpublic static final String USE - See Also:
- Constant Field Values
 
 - 
USE_TYPEpublic static final int USE_TYPE - See Also:
- Constant Field Values
 
 - 
DROPpublic static final String DROP - See Also:
- Constant Field Values
 
 - 
DROP_TYPEpublic static final int DROP_TYPE - See Also:
- Constant Field Values
 
 - 
RENAMEpublic static final String RENAME - See Also:
- Constant Field Values
 
 - 
RENAME_TYPEpublic static final int RENAME_TYPE - See Also:
- Constant Field Values
 
 - 
GET_FUNCTIONSpublic static final String GET_FUNCTIONS - See Also:
- Constant Field Values
 
 - 
GET_FUNCTIONS_TYPEpublic static final int GET_FUNCTIONS_TYPE - See Also:
- Constant Field Values
 
 - 
GET_VARIABLESpublic static final String GET_VARIABLES - See Also:
- Constant Field Values
 
 - 
GET_VARIABLES_TYPEpublic static final int GET_VARIABLES_TYPE - See Also:
- Constant Field Values
 
 - 
GET_DOCUMENTATIONpublic static final String GET_DOCUMENTATION - See Also:
- Constant Field Values
 
 - 
GET_DOCUMENTATION_TYPEpublic static final int GET_DOCUMENTATION_TYPE - See Also:
- Constant Field Values
 
 - 
LOADEDpublic static final String LOADED - See Also:
- Constant Field Values
 
 - 
LOADED_TYPEpublic static final int LOADED_TYPE - See Also:
- Constant Field Values
 
 - 
JAVA_MODULE_LOADpublic static final String JAVA_MODULE_LOAD - See Also:
- Constant Field Values
 
 - 
JAVA_MODULE_LOAD_TYPEpublic static final int JAVA_MODULE_LOAD_TYPE - See Also:
- Constant Field Values
 
 - 
JAVA_MODULE_USEpublic static final String JAVA_MODULE_USE - See Also:
- Constant Field Values
 
 - 
JAVA_MODULE_USE_TYPEpublic static final int JAVA_MODULE_USE_TYPE - See Also:
- Constant Field Values
 
 - 
ADD_LIB_ENTRIESpublic static final String ADD_LIB_ENTRIES - See Also:
- Constant Field Values
 
 - 
ADD_LIB_ENTRIES_TYPEpublic static final int ADD_LIB_ENTRIES_TYPE - See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_NONEpublic static final String IMPORT_STATE_NONE Imported module has completey clean state, nothing from ambient state- See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_SNAPSHOTpublic static final String IMPORT_STATE_SNAPSHOT Imported module gets snapshot of current ambient state, but is independent of it.- See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_SHAREpublic static final String IMPORT_STATE_SHARE Imported module shares ambient state. Any changes to ambient state are reflected in module's state.- See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_ANYpublic static final String IMPORT_STATE_ANY - See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_NONE_VALUEpublic static final int IMPORT_STATE_NONE_VALUE Used if no state is shared, i.e. completely clean state in the module (default)- See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_SNAPSHOT_VALUEpublic static final int IMPORT_STATE_SNAPSHOT_VALUE Am,bient state cloned and then added to module state.- See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_SHARE_VALUEpublic static final int IMPORT_STATE_SHARE_VALUE Ambient state used by module. Note that this causes serialization problems potentially...- See Also:
- Constant Field Values
 
 - 
IMPORT_STATE_ANY_VALUEpublic static final int IMPORT_STATE_ANY_VALUE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getNamespacepublic String getNamespace() 
 - 
getFunctionNamespublic String[] getFunctionNames() - Specified by:
- getFunctionNamesin class- AbstractEvaluator
 
 - 
getTypepublic int getType(String name) 
 - 
dispatchpublic boolean dispatch(Polyad polyad, State state) Description copied from class:AbstractEvaluatorDoes the actual evaluation of thePolyad.- Specified by:
- dispatchin class- AbstractEvaluator
- Returns:
 
 - 
getDocprotected QDLStem getDoc(DyadicFunctionReferenceNode df) 
 - 
doLoadprotected void doLoad(Polyad polyad, State state) Contract is that the type as an explicit argument is no longer required. Assumption is that a file is being loaded and if that fails, then the request is for a Java class. This accepts a single value or stem of them.- Parameters:
- polyad-
- state-
 
 - 
getInheritanceModepublic static String getInheritanceMode(int x) 
 - 
getInheritanceModepublic static int getInheritanceMode(String x) 
 - 
doImportprotected void doImport(Polyad polyad, State state) Eithjer- import(string) - namespace
- import(string, mode) - mode is a string or integer
 - Parameters:
- polyad-
- state-
 
 - 
cloneIntrinsicVariablesprotected VStack cloneIntrinsicVariables(State state) throws Throwable - Throws:
- Throwable
 
 - 
cloneIntrinsicFunctionsprotected FStack cloneIntrinsicFunctions(State state) throws Throwable - Throws:
- Throwable
 
 
- 
 
-