Class ReflectiveTypeAdapterFactory.BoundField

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) boolean deserialized  
      (package private) java.lang.reflect.Field field  
      (package private) java.lang.String fieldName
      Name of the underlying field
      (package private) java.lang.String name  
      (package private) boolean serialized  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BoundField​(java.lang.String name, java.lang.reflect.Field field, boolean serialized, boolean deserialized)  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      (package private) abstract void readIntoArray​(JsonReader reader, int index, java.lang.Object[] target)
      Read the value into the target array, used to provide constructor arguments for records
      (package private) abstract void readIntoField​(JsonReader reader, java.lang.Object target)
      Read the value from the reader, and set it on the corresponding field on target via reflection
      (package private) abstract void write​(JsonWriter writer, java.lang.Object source)
      Read this field value from the source, and append its JSON value to the writer
      • Methods inherited from class java.lang.Object

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

      • name

        final java.lang.String name
      • field

        final java.lang.reflect.Field field
      • fieldName

        final java.lang.String fieldName
        Name of the underlying field
      • serialized

        final boolean serialized
      • deserialized

        final boolean deserialized
    • Constructor Detail

      • BoundField

        protected BoundField​(java.lang.String name,
                             java.lang.reflect.Field field,
                             boolean serialized,
                             boolean deserialized)
    • Method Detail

      • write

        abstract void write​(JsonWriter writer,
                            java.lang.Object source)
                     throws java.io.IOException,
                            java.lang.IllegalAccessException
        Read this field value from the source, and append its JSON value to the writer
        Throws:
        java.io.IOException
        java.lang.IllegalAccessException
      • readIntoArray

        abstract void readIntoArray​(JsonReader reader,
                                    int index,
                                    java.lang.Object[] target)
                             throws java.io.IOException,
                                    JsonParseException
        Read the value into the target array, used to provide constructor arguments for records
        Throws:
        java.io.IOException
        JsonParseException
      • readIntoField

        abstract void readIntoField​(JsonReader reader,
                                    java.lang.Object target)
                             throws java.io.IOException,
                                    java.lang.IllegalAccessException
        Read the value from the reader, and set it on the corresponding field on target via reflection
        Throws:
        java.io.IOException
        java.lang.IllegalAccessException