Class PrimitiveSerializers.StringSerializer

java.lang.Object
tech.guilhermekaua.spigotboot.config.serialization.scalars.PrimitiveSerializers.StringSerializer
All Implemented Interfaces:
TypeSerializer<String>
Enclosing class:
PrimitiveSerializers

public static class PrimitiveSerializers.StringSerializer extends Object implements TypeSerializer<String>
Serializer for String values.
  • Constructor Details

    • StringSerializer

      public StringSerializer()
  • Method Details

    • deserialize

      public String deserialize(@NotNull @NotNull ConfigNode node, @NotNull @NotNull Class<String> type)
      Description copied from interface: TypeSerializer
      Deserializes a configuration node to the target type.
      Specified by:
      deserialize in interface TypeSerializer<String>
      Parameters:
      node - the source node
      type - the target type class
      Returns:
      the deserialized value
    • serialize

      public void serialize(@NotNull @NotNull String value, @NotNull @NotNull MutableConfigNode node)
      Description copied from interface: TypeSerializer
      Serializes a value to a configuration node.
      Specified by:
      serialize in interface TypeSerializer<String>
      Parameters:
      value - the value to serialize
      node - the target node