Class ExpressionsVisitor.SelectorArrayNode

  • All Implemented Interfaces:
    com.fasterxml.jackson.core.TreeNode, com.fasterxml.jackson.databind.JsonSerializable, com.fasterxml.jackson.databind.node.JsonNodeCreator, Serializable, Iterable<com.fasterxml.jackson.databind.JsonNode>
    Enclosing class:
    ExpressionsVisitor

    public static class ExpressionsVisitor.SelectorArrayNode
    extends com.fasterxml.jackson.databind.node.ArrayNode
    This is how we indicate to upstream operators that we are currently inside a selection statement. E.g. [{"a":1}, {"a":2}}].a will return this special subclass of array node. This is so that upstream operators (e.g. array indexes) can have special handling applied to them. For instance: [{"a":1}, {"a":2}}].a[0] does not return [1], but rather [1,2] Parenthesis can be used to drop this context, e.g.: ([{"a":1}, {"a":2}}]).a[0] returns [1]
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.JsonSerializable

        com.fasterxml.jackson.databind.JsonSerializable.Base
    • Field Summary

      • Fields inherited from class com.fasterxml.jackson.databind.node.ContainerNode

        _nodeFactory
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectorArrayNode​(com.fasterxml.jackson.databind.node.JsonNodeFactory nc)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAsSelectionGroup​(com.fasterxml.jackson.databind.JsonNode group)
      Adds the specified elements to two lists: 1.
      List<com.fasterxml.jackson.databind.JsonNode> getSelectionGroups()  
      • Methods inherited from class com.fasterxml.jackson.databind.node.ArrayNode

        _add, _at, _childrenEqual, _insert, _set, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addAll, addAll, addArray, addNull, addObject, addPOJO, addRawValue, asToken, deepCopy, elements, equals, equals, findParent, findParents, findValue, findValues, findValuesAsText, get, get, getNodeType, hashCode, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insert, insertArray, insertNull, insertObject, insertPOJO, insertRawValue, isArray, isEmpty, isEmpty, path, path, remove, removeAll, required, serialize, serializeWithType, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setNull, setPOJO, setRawValue, size
      • Methods inherited from class com.fasterxml.jackson.databind.node.ContainerNode

        arrayNode, arrayNode, asText, binaryNode, binaryNode, booleanNode, missingNode, nullNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, numberNode, objectNode, pojoNode, rawValueNode, textNode
      • Methods inherited from class com.fasterxml.jackson.databind.node.BaseJsonNode

        findPath, numberType, required, toPrettyString, toString, traverse, traverse
      • Methods inherited from class com.fasterxml.jackson.databind.JsonNode

        _reportRequiredViolation, _this, asBoolean, asBoolean, asDouble, asDouble, asInt, asInt, asLong, asLong, asText, at, at, bigIntegerValue, binaryValue, booleanValue, canConvertToExactIntegral, canConvertToInt, canConvertToLong, decimalValue, doubleValue, fieldNames, fields, findParents, findValues, findValuesAsText, floatValue, has, has, hasNonNull, hasNonNull, intValue, isBigDecimal, isBigInteger, isBinary, isBoolean, isContainerNode, isDouble, isFloat, isFloatingPointNumber, isInt, isIntegralNumber, isLong, isMissingNode, isNull, isNumber, isObject, isPojo, isShort, isTextual, isValueNode, iterator, longValue, numberValue, require, requiredAt, requiredAt, requireNonNull, shortValue, textValue, with, withArray
    • Constructor Detail

      • SelectorArrayNode

        public SelectorArrayNode​(com.fasterxml.jackson.databind.node.JsonNodeFactory nc)
    • Method Detail

      • addAsSelectionGroup

        public void addAsSelectionGroup​(com.fasterxml.jackson.databind.JsonNode group)
        Adds the specified elements to two lists: 1. Adds flattened results to array - operators that don't care about selection groups will just see this as a normal array 2. Adds non-flattened results to the separately-maintained selectionGroups list. This will be used selector-aware operators (e.g. array index) to apply appropriate semantics
        Parameters:
        group - JsonNode containing the group definitions
      • getSelectionGroups

        public List<com.fasterxml.jackson.databind.JsonNode> getSelectionGroups()