Class Scope


  • public class Scope
    extends java.lang.Object
    • Field Detail

      • DEFAULT_MAPPER

        private static final com.fasterxml.jackson.databind.ObjectMapper DEFAULT_MAPPER
      • parentScope

        private Scope parentScope
      • functions

        private java.util.Map<java.lang.String,​Function> functions
      • importedModules

        private java.util.Map<java.lang.String,​java.util.LinkedList<Module>> importedModules
      • importedData

        private java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.JsonNode> importedData
      • mapper

        private com.fasterxml.jackson.databind.ObjectMapper mapper
      • currentModule

        private Module currentModule
    • Constructor Detail

      • Scope

        private Scope​(Scope parentScope)
    • Method Detail

      • debugFunctions

        private java.util.Map<java.lang.String,​java.lang.String> debugFunctions()
      • newEmptyScope

        public static Scope newEmptyScope()
      • newChildScope

        public static Scope newChildScope​(Scope scope)
      • addFunction

        public void addFunction​(java.lang.String name,
                                int n,
                                Function q)
      • addFunction

        public void addFunction​(java.lang.String name,
                                Function q)
      • getFunction

        public Function getFunction​(java.lang.String name,
                                    int nargs)
      • getLocalFunctions

        public java.util.Map<java.lang.String,​Function> getLocalFunctions()
      • getParentScope

        public Scope getParentScope()
      • getFunctionRecursive

        private Function getFunctionRecursive​(java.lang.String name)
      • setValue

        public void setValue​(java.lang.String name,
                             com.fasterxml.jackson.databind.JsonNode value)
      • setValue

        public void setValue​(java.lang.String name,
                             java.util.function.Supplier<com.fasterxml.jackson.databind.JsonNode> supplier)
      • setValueWithPath

        public void setValueWithPath​(java.lang.String name,
                                     com.fasterxml.jackson.databind.JsonNode value,
                                     Path path)
      • setValueWithPath

        public void setValueWithPath​(java.lang.String name,
                                     java.util.function.Supplier<com.fasterxml.jackson.databind.JsonNode> value,
                                     Path path)
      • getValue

        public com.fasterxml.jackson.databind.JsonNode getValue​(java.lang.String name)
      • getObjectMapper

        public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
      • setImportedData

        public void setImportedData​(java.lang.String name,
                                    com.fasterxml.jackson.databind.JsonNode data)
      • getImportedData

        public com.fasterxml.jackson.databind.JsonNode getImportedData​(java.lang.String name)
      • addImportedModule

        public void addImportedModule​(java.lang.String name,
                                      Module module)
      • getImportedModules

        public java.util.List<Module> getImportedModules​(java.lang.String name)
      • getImportedModules

        private void getImportedModules​(java.util.List<Module> modules,
                                        java.lang.String name)
      • setModuleLoader

        public void setModuleLoader​(ModuleLoader moduleLoader)
      • getCurrentModule

        public Module getCurrentModule()
      • setCurrentModule

        public void setCurrentModule​(Module module)