Class CompiledPath

  • All Implemented Interfaces:
    Path

    public class CompiledPath
    extends java.lang.Object
    implements Path
    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
      • isRootPath

        private final boolean isRootPath
    • Constructor Detail

      • CompiledPath

        public CompiledPath​(RootPathToken root,
                            boolean isRootPath)
    • Method Detail

      • isRootPath

        public boolean isRootPath()
        Specified by:
        isRootPath in interface Path
        Returns:
        true id this path is starts with '$' and false if the path starts with '@'
      • evaluate

        public EvaluationContext evaluate​(java.lang.Object document,
                                          java.lang.Object rootDocument,
                                          Configuration configuration,
                                          boolean forUpdate)
        Description copied from interface: Path
        Evaluates this path
        Specified by:
        evaluate in interface Path
        Parameters:
        document - the json document to apply the path on
        rootDocument - the root json document that started this evaluation
        configuration - configuration to use
        forUpdate - is this a read or a write operation
        Returns:
        EvaluationContext containing results of evaluation
      • evaluate

        public EvaluationContext evaluate​(java.lang.Object document,
                                          java.lang.Object rootDocument,
                                          Configuration configuration)
        Description copied from interface: Path
        Evaluates this path
        Specified by:
        evaluate in interface Path
        Parameters:
        document - the json document to apply the path on
        rootDocument - the root json document that started this evaluation
        configuration - configuration to use
        Returns:
        EvaluationContext containing results of evaluation
      • isDefinite

        public boolean isDefinite()
        Specified by:
        isDefinite in interface Path
        Returns:
        true id this path is definite
      • isFunctionPath

        public boolean isFunctionPath()
        Specified by:
        isFunctionPath in interface Path
        Returns:
        true id this path is a function
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object