Class SerializeOptions

java.lang.Object
sawfowl.localeapi.api.serializetools.SerializeOptions

public class SerializeOptions extends Object
These options disable serialization of objects not marked by the @Setting annotation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.spongepowered.configurate.objectmapping.ObjectMapper.Factory
     
    static final org.spongepowered.configurate.serialize.TypeSerializerCollection
     
    static final org.spongepowered.configurate.ConfigurationOptions
     
    static final org.spongepowered.configurate.ConfigurationOptions
     
    static final org.spongepowered.configurate.ConfigurationOptions
     
    static final org.spongepowered.configurate.serialize.TypeSerializerCollection
     
    static final org.spongepowered.configurate.serialize.TypeSerializerCollection
     
    static final org.spongepowered.configurate.serialize.TypeSerializerCollection
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T, C extends org.spongepowered.configurate.ConfigurationNode>
    org.spongepowered.configurate.loader.ConfigurationLoader<C>
    createConfigLoader(Class<T> loaderClass, Class<C> nodeClass, Path path, ConfigTypes configType, int itemStackSerializerVariant)
    Creating a configuration loader with a type.
    static org.spongepowered.configurate.hocon.HoconConfigurationLoader.Builder
    createHoconConfigurationLoader(int itemStackSerializerVariant)
    Creating a HOCON config with serializers applied and standard options preserved.
    static org.spongepowered.configurate.gson.GsonConfigurationLoader.Builder
    createJsonConfigurationLoader(int itemStackSerializerVariant)
    Creating a JSON config with serializers applied and standard options preserved.
    static org.spongepowered.configurate.ConfigurationNode
    createVirtualNode(int itemStackSerializerVariant)
     
    static org.spongepowered.configurate.yaml.YamlConfigurationLoader.Builder
    createYamlConfigurationLoader(int itemStackSerializerVariant)
    Creating a YAML config with serializers applied and standard options preserved.
    static org.spongepowered.configurate.ConfigurationOptions
    selectOptions(int itemStackSerializerVariant)
    Selecting serialization variant for items.
    1 - All NBT tags will be written in 1 line.
    static org.spongepowered.configurate.serialize.TypeSerializerCollection
    selectSerializersCollection(int itemStackSerializerVariant)
    Selecting serialization variant for items.
    1 - All NBT tags will be written in 1 line.

    Methods inherited from class java.lang.Object

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

    • FACTORY

      public static final org.spongepowered.configurate.objectmapping.ObjectMapper.Factory FACTORY
    • JSON_SERIALIZERS

      public static final org.spongepowered.configurate.serialize.TypeSerializerCollection JSON_SERIALIZERS
    • SERIALIZER_COLLECTION_VARIANT_1

      public static final org.spongepowered.configurate.serialize.TypeSerializerCollection SERIALIZER_COLLECTION_VARIANT_1
    • SERIALIZER_COLLECTION_VARIANT_2

      public static final org.spongepowered.configurate.serialize.TypeSerializerCollection SERIALIZER_COLLECTION_VARIANT_2
    • SERIALIZER_COLLECTION_VARIANT_3

      public static final org.spongepowered.configurate.serialize.TypeSerializerCollection SERIALIZER_COLLECTION_VARIANT_3
    • OPTIONS_VARIANT_1

      public static final org.spongepowered.configurate.ConfigurationOptions OPTIONS_VARIANT_1
    • OPTIONS_VARIANT_2

      public static final org.spongepowered.configurate.ConfigurationOptions OPTIONS_VARIANT_2
    • OPTIONS_VARIANT_3

      public static final org.spongepowered.configurate.ConfigurationOptions OPTIONS_VARIANT_3
  • Constructor Details

    • SerializeOptions

      public SerializeOptions()
  • Method Details

    • createYamlConfigurationLoader

      public static org.spongepowered.configurate.yaml.YamlConfigurationLoader.Builder createYamlConfigurationLoader(int itemStackSerializerVariant)
      Creating a YAML config with serializers applied and standard options preserved.
    • createHoconConfigurationLoader

      public static org.spongepowered.configurate.hocon.HoconConfigurationLoader.Builder createHoconConfigurationLoader(int itemStackSerializerVariant)
      Creating a HOCON config with serializers applied and standard options preserved.
    • createJsonConfigurationLoader

      public static org.spongepowered.configurate.gson.GsonConfigurationLoader.Builder createJsonConfigurationLoader(int itemStackSerializerVariant)
      Creating a JSON config with serializers applied and standard options preserved.
    • createVirtualNode

      public static org.spongepowered.configurate.ConfigurationNode createVirtualNode(int itemStackSerializerVariant)
    • createConfigLoader

      public static <T, C extends org.spongepowered.configurate.ConfigurationNode> org.spongepowered.configurate.loader.ConfigurationLoader<C> createConfigLoader(Class<T> loaderClass, Class<C> nodeClass, Path path, ConfigTypes configType, int itemStackSerializerVariant)
      Creating a configuration loader with a type.
      Type Parameters:
      T - loaderClass - Configuration Loader Class.
      C - nodeClass - Configuration node processing class. Note that `CommentedConfigurationNode` is not suitable for configurations in Json format.
      Parameters:
      path - - Path to the configuration file.
      configType - - Configuration Type. To avoid errors, it must point to the same class loader as the `Class loaderClass` parameter.
      itemStackSerializerVariant - - The type of item serialization used. See selectSerializersCollection(int)
      Returns:
    • selectOptions

      public static org.spongepowered.configurate.ConfigurationOptions selectOptions(int itemStackSerializerVariant)
      Selecting serialization variant for items.
      1 - All NBT tags will be written in 1 line. This option is the most reliable, but significantly complicates manual editing of NBT tags in config.
      2 - Advanced recording. Easier to make manual changes to the config. If you have problems with this type of serialization, you should report errors to the LocaleAPI plugin developer.
      3 - Using Sponge serializer. Some data will be written in 1 line. If you encounter problems with this type of serialization, you should report bugs to the Sponge developers.
    • selectSerializersCollection

      public static org.spongepowered.configurate.serialize.TypeSerializerCollection selectSerializersCollection(int itemStackSerializerVariant)
      Selecting serialization variant for items.
      1 - All NBT tags will be written in 1 line. This option is the most reliable, but significantly complicates manual editing of NBT tags in config.
      2 - Advanced recording. Easier to make manual changes to the config. If you have problems with this type of serialization, you should report errors to the LocaleAPI plugin developer.
      3 - Using Sponge serializer. Some data will be written in 1 line. If you encounter problems with this type of serialization, you should report bugs to the Sponge developers.