Class YamlDeserializerBase<T>

    • Constructor Detail

      • YamlDeserializerBase

        public YamlDeserializerBase​(Class<T> type)
    • Method Detail

      • getType

        public Class<T> getType()
      • construct

        public Object construct​(org.snakeyaml.engine.v2.nodes.Node node)
        Specified by:
        construct in interface org.snakeyaml.engine.v2.api.ConstructNode
      • newInstance

        protected abstract T newInstance()
        Creates a Java instance of the expected type.
        Returns:
        the instance.
      • newInstance

        protected T newInstance​(String value)
        Creates a Java instance of the expected type from a string.
        Returns:
        the instance.
      • setProperty

        protected boolean setProperty​(T target,
                                      String propertyKey,
                                      String propertyName,
                                      org.snakeyaml.engine.v2.nodes.Node value)
        Set a property to the given target.
        Parameters:
        target - the target object
        propertyKey - the normalized property key
        propertyName - the name of the property as defined in the YAML
        value - the value of the property as Node
      • setProperties

        protected void setProperties​(T target,
                                     org.snakeyaml.engine.v2.nodes.MappingNode node)
        Set properties from a YAML node to the given target.
        Parameters:
        node - the node
        target - the target object
      • handleUnknownProperty

        protected void handleUnknownProperty​(T target,
                                             String propertyKey,
                                             String propertyName,
                                             org.snakeyaml.engine.v2.nodes.Node value)