Class UuidTypeAdapter

java.lang.Object
com.google.gson.TypeAdapter<java.util.UUID>
org.ammonium.common.util.gson.adapter.UuidTypeAdapter

public final class UuidTypeAdapter
extends com.google.gson.TypeAdapter<java.util.UUID>
Represents an adapter to help with serialization/deserialization of unique identifiers.
  • Constructor Summary

    Constructors 
    Constructor Description
    UuidTypeAdapter()  
  • Method Summary

    Modifier and Type Method Description
    java.util.UUID read​(com.google.gson.stream.JsonReader in)  
    void write​(com.google.gson.stream.JsonWriter out, java.util.UUID value)  

    Methods inherited from class com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object

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

  • Method Details

    • write

      public void write​(com.google.gson.stream.JsonWriter out, java.util.UUID value) throws java.io.IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<java.util.UUID>
      Throws:
      java.io.IOException
    • read

      public java.util.UUID read​(com.google.gson.stream.JsonReader in) throws java.io.IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<java.util.UUID>
      Throws:
      java.io.IOException