Class MapParser

    • Constructor Detail

      • MapParser

        public MapParser()
    • Method Detail

      • defines

        public boolean defines​(java.lang.Object value)
      • marshal

        protected boolean marshal​(MarshallingContext context,
                                  Parser delegate,
                                  int minOccurs,
                                  int maxOccurs)
                           throws java.io.IOException
        Specified by:
        marshal in class Aggregation
        Throws:
        java.io.IOException
      • isProperty

        public boolean isProperty()
        Returns whether this iteration is a property of a bean object.
        Specified by:
        isProperty in class Aggregation
        Returns:
        true if this iteration is a property, false otherwise
      • getType

        public java.lang.Class<? extends java.util.Map<java.lang.Object,​java.lang.Object>> getType()
      • setType

        public void setType​(java.lang.Class<?> mapType)
        Sets the concrete Map type.
      • createValue

        public java.lang.Object createValue​(ParsingContext context)
        Description copied from interface: Property
        Creates the property value and returns it.
        Parameters:
        context - the ParsingContext
        Returns:
        the property value
      • createMap

        protected java.util.Map<java.lang.Object,​java.lang.Object> createMap()
      • getMap

        protected java.util.Map<java.lang.Object,​java.lang.Object> getMap​(ParsingContext context)
        Returns the map value being parsed.
        Returns:
        the Map
      • length

        protected int length​(java.lang.Object value)
        Description copied from class: Aggregation
        Returns the length of aggregation.
        Specified by:
        length in class Aggregation
        Parameters:
        value - the aggregation value
        Returns:
        the length
      • getIterationSize

        public int getIterationSize()
        Description copied from interface: Iteration
        Returns the size of the components that make up a single iteration.
        Returns:
        the iteration size
      • registerLocals

        public void registerLocals​(java.util.Set<ParserLocal<? extends java.lang.Object>> locals)
        Description copied from class: Component
        Called by a stream to register variables stored in the parsing context. This method should be overridden by subclasses that need to register one or more parser context variables.
        Overrides:
        registerLocals in class Aggregation
        Parameters:
        locals - set of local variables
      • hasContent

        public boolean hasContent​(ParsingContext context)
        Description copied from interface: Parser
        Returns whether this parser or any of its descendant have content for marshalling.
        Specified by:
        hasContent in interface Parser
        Overrides:
        hasContent in class DelegatingParser
        Parameters:
        context - the ParsingContext
        Returns:
        true if there is content for marshalling, false otherwise
      • setKey

        public void setKey​(Property key)
      • toParamString

        protected void toParamString​(java.lang.StringBuilder s)
        Description copied from class: TreeNode
        Called by TreeNode.toString() to append node parameters to the output.
        Overrides:
        toParamString in class Aggregation
        Parameters:
        s - the output to append