Class StringFormTypeAdapter<T>

java.lang.Object
ca.spottedleaf.yamlconfig.adapter.TypeAdapter<T,String>
ca.spottedleaf.yamlconfig.adapter.generic.StringFormTypeAdapter<T>
Direct Known Subclasses:
CalenderDurationTypeAdapter, DurationTypeAdapter

public abstract class StringFormTypeAdapter<T> extends TypeAdapter<T,String>
  • Constructor Details

    • StringFormTypeAdapter

      public StringFormTypeAdapter()
  • Method Details

    • deserialize

      public final T deserialize(TypeAdapterRegistry registry, Object input, Type type)
      Description copied from class: TypeAdapter
      Deserializes the value from YAML.
      Specified by:
      deserialize in class TypeAdapter<T,String>
      Parameters:
      registry - The type adapter registry context.
      input - The object from YAML.
      type - The type information associated with the deserialized object.
      Returns:
      The deserialized form of the object.
    • serialize

      public final String serialize(TypeAdapterRegistry registry, T value, Type type)
      Description copied from class: TypeAdapter
      Serializes the value to YAML.
      Specified by:
      serialize in class TypeAdapter<T,String>
      Parameters:
      registry - The type adapter registry context.
      value - The deserialized form of the object.
      type - The type information associated with the deserialized object.
      Returns:
      The serialized form of the object.
    • fromString

      public abstract T fromString(String value)
    • toString

      public abstract String toString(T value)