Package com.enonic.xp.script.serializer

## Class MapGeneratorBase

- java.lang.Object
- - com.enonic.xp.script.serializer.MapGeneratorBase

- All Implemented Interfaces:
    `MapGenerator`
  Direct Known Subclasses:
    `JsonMapGenerator`

      @PublicApi
      public abstract class MapGeneratorBase
      extends Object
      implements MapGenerator

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MapGeneratorBase()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected abstract void` | `addToArray​(Object array, Object value)` |
    `MapGenerator` | `array()` |
    `MapGenerator` | `array​(String key)` |
    `MapGenerator` | `end()` |
    `Object` | `getRoot()` |
    `protected void` | `initRoot()` |
    `protected abstract boolean` | `isArray​(Object value)` |
    `protected abstract boolean` | `isMap​(Object value)` |
    `MapGenerator` | `map()` |
    `MapGenerator` | `map​(String key)` |
    `protected abstract Object` | `newArray()` |
    `protected abstract Object` | `newFunction​(Function<?,​?> function)` |
    `protected abstract MapGeneratorBase` | `newGenerator()` |
    `protected abstract Object` | `newMap()` |
    `protected abstract void` | `putInMap​(Object map, String key, Object value)` |
    `protected abstract void` | `putRawValueInMap​(Object map, String key, Object value)` |
    `MapGenerator` | `rawValue​(Object value)` |
    `MapGenerator` | `rawValue​(String key, Object value)` |
    `MapGenerator` | `value​(Object value)` |
    `MapGenerator` | `value​(String key, Object value)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MapGeneratorBase

          public MapGeneratorBase()

  - ### Method Detail

    - #### initRoot

          protected void initRoot()

    - #### getRoot

          public final Object getRoot()

    - #### newMap

          protected abstract Object newMap()

    - #### newArray

          protected abstract Object newArray()

    - #### newFunction

          protected abstract Object newFunction​(Function<?,​?> function)

    - #### isMap

          protected abstract boolean isMap​(Object value)

    - #### isArray

          protected abstract boolean isArray​(Object value)

    - #### putInMap

          protected abstract void putInMap​(Object map,
                                           String key,
                                           Object value)

    - #### putRawValueInMap

          protected abstract void putRawValueInMap​(Object map,
                                                   String key,
                                                   Object value)

    - #### addToArray

          protected abstract void addToArray​(Object array,
                                             Object value)

    - #### array

          public final MapGenerator array()

      Specified by:
        `array` in interface `MapGenerator`

    - #### array

          public final MapGenerator array​(String key)

      Specified by:
        `array` in interface `MapGenerator`

    - #### map

          public final MapGenerator map()

      Specified by:
        `map` in interface `MapGenerator`

    - #### map

          public final MapGenerator map​(String key)

      Specified by:
        `map` in interface `MapGenerator`

    - #### value

          public final MapGenerator value​(Object value)

      Specified by:
        `value` in interface `MapGenerator`

    - #### value

          public final MapGenerator value​(String key,
                                          Object value)

      Specified by:
        `value` in interface `MapGenerator`

    - #### rawValue

          public MapGenerator rawValue​(Object value)

      Specified by:
        `rawValue` in interface `MapGenerator`

    - #### rawValue

          public MapGenerator rawValue​(String key,
                                       Object value)

      Specified by:
        `rawValue` in interface `MapGenerator`

    - #### end

          public final MapGenerator end()

      Specified by:
        `end` in interface `MapGenerator`

    - #### newGenerator

          protected abstract MapGeneratorBase newGenerator()