Class MapEntityContext.MapEntitySequenceYamlContext<T>

All Implemented Interfaces:
Enclosing class:

public static class MapEntityContext.MapEntitySequenceYamlContext<T> extends BlockContext.DefaultListContext<T>
  • Constructor Details

    • MapEntitySequenceYamlContext

      public MapEntitySequenceYamlContext(Class<T> itemClass)
  • Method Details

    • getContext

      public BlockContext<?> getContext(String nameOfSubcontext)
      Description copied from interface: BlockContext
      Called after reading a key of map entry in YAML file and before reading its value. The key of the entry is represented as nameOfSubcontext parameter, and provides means to specify a YamlContext for transforming the mapping value into appropriate Java object.
      Specified by:
      getContext in interface BlockContext<T>
      getContext in class BlockContext.DefaultListContext<T>
      nameOfSubcontext - Key of the map entry
      Context used for transforming the value, or null if the default primitive / sequence / mapping context should be used instead.
      See Also:
    • add

      public void add(String name, Object value)
      Description copied from interface: BlockContext
      Modifies the result returned from within this context by providing the read mapping entry name to given value.

      Called after reading a map entry (both key and value) from the YAML file is finished. The entry is represented as name parameter (key part of the entry) and value (value part of the entry).

      The method is called in the same order as the mapping items appear in the source YAML mapping.