Class DirectionAdapter

java.lang.Object
fr.ghostrider584.axiom.annotation.storage.json.serializer.DirectionAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<net.minestom.server.utils.Direction>, com.google.gson.JsonSerializer<net.minestom.server.utils.Direction>

public class DirectionAdapter extends Object implements com.google.gson.JsonSerializer<net.minestom.server.utils.Direction>, com.google.gson.JsonDeserializer<net.minestom.server.utils.Direction>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minestom.server.utils.Direction
    deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context)
     
    com.google.gson.JsonElement
    serialize(net.minestom.server.utils.Direction src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
     

    Methods inherited from class Object

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

    • DirectionAdapter

      public DirectionAdapter()
  • Method Details

    • serialize

      public com.google.gson.JsonElement serialize(net.minestom.server.utils.Direction src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<net.minestom.server.utils.Direction>
    • deserialize

      public net.minestom.server.utils.Direction deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<net.minestom.server.utils.Direction>
      Throws:
      com.google.gson.JsonParseException