Class StandardConstructor

java.lang.Object
org.snakeyaml.engine.v2.constructor.BaseConstructor
org.snakeyaml.engine.v2.constructor.StandardConstructor

public class StandardConstructor extends BaseConstructor
Construct standard Java classes
  • Constructor Details

    • StandardConstructor

      public StandardConstructor(LoadSettings settings)
      Create
      Parameters:
      settings - - configuration options
  • Method Details

    • flattenMapping

      protected void flattenMapping(MappingNode node)
      Flattening is not required because merge was removed from YAML 1.2 Only check duplications
      Parameters:
      node - - mapping to check the duplications
    • processDuplicateKeys

      protected void processDuplicateKeys(MappingNode node)
      detect and process the duplicate key in mapping according to the configured setting
      Parameters:
      node - - the source
    • constructKey

      private Object constructKey(Node keyNode, Optional<Mark> contextMark, Optional<Mark> problemMark)
    • constructMapping2ndStep

      protected void constructMapping2ndStep(MappingNode node, Map<Object,Object> mapping)
      Description copied from class: BaseConstructor
      Fill the mapping with the data from provided node
      Overrides:
      constructMapping2ndStep in class BaseConstructor
      Parameters:
      node - - the source
      mapping - - empty map to be filled
    • constructSet2ndStep

      protected void constructSet2ndStep(MappingNode node, Set<Object> set)
      Description copied from class: BaseConstructor
      Fill the Map with the data from the node
      Overrides:
      constructSet2ndStep in class BaseConstructor
      Parameters:
      node - - the source
      set - - empty set to fill