Class FieldTypeAdapter

  • All Implemented Interfaces:
    com.google.gson.JsonSerializer<CMAField>

    public class FieldTypeAdapter
    extends java.lang.Object
    implements com.google.gson.JsonSerializer<CMAField>
    FieldTypeAdapter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.gson.JsonElement serialize​(CMAField field, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext context)
      Serialize all fields for content types.
      • Methods inherited from class java.lang.Object

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

      • FieldTypeAdapter

        public FieldTypeAdapter()
    • Method Detail

      • serialize

        public com.google.gson.JsonElement serialize​(CMAField field,
                                                     java.lang.reflect.Type type,
                                                     com.google.gson.JsonSerializationContext context)
        Serialize all fields for content types.
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<CMAField>
        Parameters:
        field - the content type field to be serialized
        type - the type to be used.
        context - the json context to be used.
        Returns:
        a json object representing the field.