Class TokenFilterContext

    • Field Detail

      • _parent

        protected final TokenFilterContext _parent
        Parent context for this context; null for root context.
      • _currentName

        protected java.lang.String _currentName
        Name of the field of which value is to be parsed; only used for OBJECT contexts
      • _filter

        protected TokenFilter _filter
        Filter to use for items in this state (for properties of Objects, elements of Arrays, and root-level values of root context)
      • _startHandled

        protected boolean _startHandled
        Flag that indicates that start token has been read/written, so that matching close token needs to be read/written as well when context is getting closed.
      • _needToHandleName

        protected boolean _needToHandleName
        Flag that indicates that the current name of this context still needs to be read/written, if path from root down to included leaf is to be exposed.
    • Constructor Detail

    • Method Detail

      • checkValue

        public TokenFilter checkValue​(TokenFilter filter)
        Method called to check whether value is to be included at current output position, either as Object property, Array element, or root value.
      • writePath

        public void writePath​(JsonGenerator gen)
                       throws java.io.IOException
        Method called to ensure that parent path from root is written up to and including this node.
        Throws:
        java.io.IOException
      • writeImmediatePath

        public void writeImmediatePath​(JsonGenerator gen)
                                throws java.io.IOException
        Variant of writePath(JsonGenerator) called when all we need is immediately surrounding Object. Method typically called when including a single property but not including full path to root.
        Throws:
        java.io.IOException
      • _writePath

        private void _writePath​(JsonGenerator gen)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • skipParentChecks

        public void skipParentChecks()
      • getCurrentValue

        public java.lang.Object getCurrentValue()
        Description copied from class: JsonStreamContext
        Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy.

        Note that "current value" is NOT populated (or used) by Streaming parser or generator; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.

        Overrides:
        getCurrentValue in class JsonStreamContext
        Returns:
        Currently active value, if one has been assigned.
      • getCurrentName

        public final java.lang.String getCurrentName()
        Description copied from class: JsonStreamContext
        Method for accessing name associated with the current location. Non-null for FIELD_NAME and value events that directly follow field names; null for root level and array values.
        Specified by:
        getCurrentName in class JsonStreamContext
      • isStartHandled

        public boolean isStartHandled()
      • nextTokenToRead

        public JsonToken nextTokenToRead()
      • appendDesc

        protected void appendDesc​(java.lang.StringBuilder sb)
      • toString

        public java.lang.String toString()
        Overridden to provide developer writeable "JsonPath" representation of the context.
        Overrides:
        toString in class JsonStreamContext