Package org.snakeyaml.engine.v2.api
Interface ConstructNode
-
- All Known Implementing Classes:
ConstructOptionalClass,ConstructScalar,ConstructUuidClass,ConstructYamlBinary,ConstructYamlCoreBool,ConstructYamlCoreFloat,ConstructYamlCoreInt,ConstructYamlJsonBool,ConstructYamlJsonFloat,ConstructYamlJsonInt,ConstructYamlNull,StandardConstructor.ConstructEnv,StandardConstructor.ConstructYamlMap,StandardConstructor.ConstructYamlSeq,StandardConstructor.ConstructYamlSet,StandardConstructor.ConstructYamlStr
public interface ConstructNodeProvide a way to construct a Java instance from the composed Node. Support recursive objects if it is required. (create Native Data Structure out of Node Graph) (this is the opposite for Represent)- See Also:
- Processing Overview
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Objectconstruct(org.snakeyaml.engine.v2.nodes.Node node)Construct a Java instance with all the properties injected when it is possible.default voidconstructRecursive(org.snakeyaml.engine.v2.nodes.Node node, Object object)Apply the second step when constructing recursive structures.
-
-
-
Method Detail
-
construct
Object construct(org.snakeyaml.engine.v2.nodes.Node node)
Construct a Java instance with all the properties injected when it is possible.- Parameters:
node- composed Node- Returns:
- a complete Java instance or empty collection instance if it is recursive
-
constructRecursive
default void constructRecursive(org.snakeyaml.engine.v2.nodes.Node node, Object object)Apply the second step when constructing recursive structures. Because the instance is already created it can assign a reference to itself. (no need to implement this method for non-recursive data structures). Fail with a reminder to provide the second step for a recursive structure- Parameters:
node- composed Nodeobject- the instance constructed earlier byconstruct(Node node)for the provided Node
-
-