Class SerializeFieldsYamlBase

java.lang.Object
boofcv.io.serialize.SerializeFieldsYamlBase
Direct Known Subclasses:
SerializeConfigYaml

public class SerializeFieldsYamlBase extends Object
Base class for java serialization of public field variables. Custom error handling is provided by the errorHandler function. By default any error will throw an exception.
  • Field Details

  • Constructor Details

    • SerializeFieldsYamlBase

      public SerializeFieldsYamlBase()
  • Method Details

    • serialize

      public Map<String,Object> serialize(Object config, @Nullable @Nullable Object canonical)
      Serializes the specified config. If a 'canonical' reference is provided then only what is not identical in value to the canonical is serialized.
      Parameters:
      config - Object that is to be serialized
      canonical - Canonical object.
    • deserialize

      protected void deserialize(Object parent, Map<String,Object> state)
    • checkBeforeDeserialize

      protected void checkBeforeDeserialize(Class type) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • checkBeforeDeserialize

      protected void checkBeforeDeserialize(String name) throws IllegalAccessException
      Throws:
      IllegalAccessException
    • allowedDeserialize

      public static boolean allowedDeserialize(String name)
      Default algorithm which allows classes to be deserialized. A static function is provided so that the allowed list can be easily extended. This works by only allowing certain packages to load. You could by pass this by adding a jar with one of these class paths, but if that happens you're already screwed.
    • createYmlObject

      public static org.yaml.snakeyaml.Yaml createYmlObject()