Class Constructor.ConstructYamlObject

java.lang.Object
org.yaml.snakeyaml.constructor.Constructor.ConstructYamlObject
All Implemented Interfaces:
Construct
Enclosing class:
Constructor

protected class Constructor.ConstructYamlObject extends Object implements Construct
Construct an instance when the runtime class is not known but a global tag with a class name is defined. It delegates the construction to the appropriate constructor based on the node kind (scalar, sequence, mapping)
  • Constructor Details

    • ConstructYamlObject

      protected ConstructYamlObject()
  • Method Details

    • construct

      public Object construct(Node node)
      Description copied from interface: Construct
      Construct a Java instance with all the properties injected when it is possible.
      Specified by:
      construct in interface Construct
      Parameters:
      node - composed Node
      Returns:
      a complete Java instance
    • construct2ndStep

      public void construct2ndStep(Node node, Object object)
      Description copied from interface: Construct
      Apply the second step when constructing recursive structures. Because the instance is already created it can assign a reference to itself.
      Specified by:
      construct2ndStep in interface Construct
      Parameters:
      node - composed Node
      object - the instance constructed earlier by construct(Node node) for the provided Node