Class CompactConstructor

    • Constructor Detail

      • CompactConstructor

        public CompactConstructor​(LoaderOptions loadingConfig)
        Create with provided options
        Parameters:
        loadingConfig - - options
      • CompactConstructor

        public CompactConstructor()
        Create with defaults
    • Method Detail

      • 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()
        Create
        Returns:
        new instance
      • 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