Class UpdaterMapper<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) JsonReaderI<?> mapper  
      (package private) T obj  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addValue​(java.lang.Object current, java.lang.Object value)
      add a value in an array json object.
      T convert​(java.lang.Object current)
      Allow a mapper to converte a temprary structure to the final data format.
      java.lang.Object createArray()
      use to instantiate a new object that will be used as an array
      java.lang.Object createObject()
      use to instantiate a new object that will be used as an object
      void setValue​(java.lang.Object current, java.lang.String key, java.lang.Object value)
      called when json-smart done parsing a value
      JsonReaderI<?> startArray​(java.lang.String key)
      called when json-smart parser start an array.
      JsonReaderI<?> startObject​(java.lang.String key)
      called when json-smart parser meet an object key
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UpdaterMapper

        public UpdaterMapper​(JsonReader base,
                             T obj)
      • UpdaterMapper

        public UpdaterMapper​(JsonReader base,
                             T obj,
                             java.lang.reflect.Type type)
    • Method Detail

      • startArray

        public JsonReaderI<?> startArray​(java.lang.String key)
                                  throws ParseException,
                                         java.io.IOException
        called when json-smart parser start an array.
        Overrides:
        startArray in class JsonReaderI<T>
        Parameters:
        key - the destination key name, or null.
        Throws:
        ParseException
        java.io.IOException
      • setValue

        public void setValue​(java.lang.Object current,
                             java.lang.String key,
                             java.lang.Object value)
                      throws ParseException,
                             java.io.IOException
        called when json-smart done parsing a value
        Overrides:
        setValue in class JsonReaderI<T>
        Throws:
        ParseException
        java.io.IOException
      • addValue

        public void addValue​(java.lang.Object current,
                             java.lang.Object value)
                      throws ParseException,
                             java.io.IOException
        add a value in an array json object.
        Overrides:
        addValue in class JsonReaderI<T>
        Throws:
        ParseException
        java.io.IOException
      • createObject

        public java.lang.Object createObject()
        use to instantiate a new object that will be used as an object
        Overrides:
        createObject in class JsonReaderI<T>
      • createArray

        public java.lang.Object createArray()
        use to instantiate a new object that will be used as an array
        Overrides:
        createArray in class JsonReaderI<T>
      • convert

        public T convert​(java.lang.Object current)
        Allow a mapper to converte a temprary structure to the final data format. example: convert an List to an int[]
        Overrides:
        convert in class JsonReaderI<T>