Class CompactConstructor

Direct Known Subclasses:
PackageCompactConstructor

public class CompactConstructor
extends Constructor
Construct a custom Java instance out of a compact object notation format.
  • Constructor Details

  • Method Details

    • constructCompactFormat

      protected java.lang.Object constructCompactFormat​(ScalarNode node, CompactData data)
    • createInstance

      protected java.lang.Object createInstance​(ScalarNode node, CompactData data) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • setProperties

      protected void setProperties​(java.lang.Object bean, java.util.Map<java.lang.String,​java.lang.Object> data) throws java.lang.Exception
      Throws:
      java.lang.Exception
    • getCompactData

      public CompactData getCompactData​(java.lang.String scalar)
    • createCompactConstruct

      protected Construct createCompactConstruct()
    • getConstructor

      protected Construct getConstructor​(Node node)
      Description copied from class: BaseConstructor
      Get the constructor to construct the Node. For implicit tags if the runtime class is known a dedicated Construct implementation is used. Otherwise the constructor is chosen by the tag.
      Overrides:
      getConstructor in class BaseConstructor
      Parameters:
      node - Node to construct an instance from
      Returns:
      Construct implementation for the specified node
    • applySequence

      protected void applySequence​(java.lang.Object bean, java.util.List<?> value)
    • getSequencePropertyName

      protected java.lang.String getSequencePropertyName​(java.lang.Class<?> bean)
      Provide the name of the property which is used when the entries form a sequence. The property must be a List.
      Parameters:
      bean - the class to provide exactly one List property
      Returns:
      name of the List property