Class EvaluationContextImpl

    • Field Detail

      • valueResult

        private final java.lang.Object valueResult
      • pathResult

        private final java.lang.Object pathResult
      • path

        private final Path path
      • rootDocument

        private final java.lang.Object rootDocument
      • updateOperations

        private final java.util.List<PathRef> updateOperations
      • documentEvalCache

        private final java.util.HashMap<Path,​java.lang.Object> documentEvalCache
      • forUpdate

        private final boolean forUpdate
      • resultIndex

        private int resultIndex
    • Constructor Detail

      • EvaluationContextImpl

        public EvaluationContextImpl​(Path path,
                                     java.lang.Object rootDocument,
                                     Configuration configuration,
                                     boolean forUpdate)
    • Method Detail

      • documentEvalCache

        public java.util.HashMap<Path,​java.lang.Object> documentEvalCache()
      • forUpdate

        public boolean forUpdate()
      • addResult

        public void addResult​(java.lang.String path,
                              PathRef operation,
                              java.lang.Object model)
      • options

        public java.util.Set<Option> options()
      • getValue

        public <T> T getValue()
        Description copied from interface: EvaluationContext
        This method does not adhere to configuration settings. It will return a single object (not wrapped in a List) even if the configuration contains the Option.ALWAYS_RETURN_LIST
        Specified by:
        getValue in interface EvaluationContext
        Type Parameters:
        T - expected return type
        Returns:
        evaluation result
      • getValue

        public <T> T getValue​(boolean unwrap)
        Description copied from interface: EvaluationContext
        Specified by:
        getValue in interface EvaluationContext
        Type Parameters:
        T - expected return type
        Parameters:
        unwrap - tells th underlying json provider if primitives should be unwrapped
        Returns:
        evaluation result
      • getPath

        public <T> T getPath()
        Description copied from interface: EvaluationContext
        Returns the list of formalized paths that represent the result of the evaluation
        Specified by:
        getPath in interface EvaluationContext
        Returns:
        list of paths
      • getPathList

        public java.util.List<java.lang.String> getPathList()
        Description copied from interface: EvaluationContext
        Convenience method to get list of hits as String path representations
        Specified by:
        getPathList in interface EvaluationContext
        Returns:
        list of path representations