Class Scope

java.lang.Object
net.thisptr.jackson.jq.Scope

public class Scope extends Object
  • Field Details

    • DEFAULT_MAPPER

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

      private Scope parentScope
    • functions

      private Map<String,Function> functions
    • importedModules

      private Map<String,LinkedList<Module>> importedModules
    • importedData

      private Map<String,com.fasterxml.jackson.databind.JsonNode> importedData
    • moduleLoader

      private ModuleLoader moduleLoader
    • values

      private Map<String,Scope.ValueWithPath> values
    • mapper

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

      private Module currentModule
  • Constructor Details

    • Scope

      private Scope(Scope parentScope)
  • Method Details

    • debugFunctions

      private Map<String,String> debugFunctions()
    • newEmptyScope

      public static Scope newEmptyScope()
    • newChildScope

      public static Scope newChildScope(Scope scope)
    • addFunction

      public void addFunction(String name, int n, Function q)
    • addFunction

      public void addFunction(String name, Function q)
    • getFunction

      public Function getFunction(String name, int nargs)
    • getLocalFunctions

      public Map<String,Function> getLocalFunctions()
    • getParentScope

      public Scope getParentScope()
    • getFunctionRecursive

      private Function getFunctionRecursive(String name)
    • setValue

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

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

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

      public void setValueWithPath(String name, Supplier<com.fasterxml.jackson.databind.JsonNode> value, Path path)
    • getValueWithPath

      public Scope.ValueWithPath getValueWithPath(String name)
    • getValue

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

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

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

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

      public void addImportedModule(String name, Module module)
    • getImportedModules

      public List<Module> getImportedModules(String name)
    • getImportedModules

      private void getImportedModules(List<Module> modules, String name)
    • setModuleLoader

      public void setModuleLoader(ModuleLoader moduleLoader)
    • getModuleLoader

      public ModuleLoader getModuleLoader()
    • getCurrentModule

      public Module getCurrentModule()
    • setCurrentModule

      public void setCurrentModule(Module module)