Class ParsingContext

  • Direct Known Subclasses:
    MarshallingContext, UnmarshallingContext

    public abstract class ParsingContext
    extends java.lang.Object
    Base class for the parsing context- marshalling or unmarshaling.
    Since:
    2.0
    • Constructor Detail

      • ParsingContext

        public ParsingContext()
    • Method Detail

      • clear

        protected void clear()
      • pushIteration

        public void pushIteration​(Iteration iteration)
        Pushes an Iteration onto a stack for adjusting field positions and indices.
        Parameters:
        iteration - the Iteration to push
        See Also:
        popIteration()
      • getAdjustedFieldPosition

        public final int getAdjustedFieldPosition​(int position)
        Calculates a field position by adjusting for any applied iterations.
        Parameters:
        position - the field position to adjust (i.e. the position of the first occurrence of the field)
        Returns:
        the adjusted field position
      • getRelativeFieldIndex

        public final int getRelativeFieldIndex()
        Returns the current field index relative to any current iteration.
        Returns:
        the field index
      • isRepeating

        public final boolean isRepeating()
        Returns whether a repeating segment or field is being parsed.
        Returns:
        true if repeating, false otherwise
      • createHeap

        public final void createHeap​(int size)
      • getLocal

        public final java.lang.Object getLocal​(int index)
      • setLocal

        public final void setLocal​(int index,
                                   java.lang.Object obj)