Class NestedPropertiesBuilder

    • Field Detail

      • elementNames

        private final java.util.Map<java.lang.String,​java.lang.String> elementNames
      • trimData

        private boolean trimData
      • allowUnknownChildElements

        private boolean allowUnknownChildElements
    • Constructor Detail

      • NestedPropertiesBuilder

        NestedPropertiesBuilder​(java.lang.String keyPattern,
                                java.lang.String namespaceURI,
                                RulesBinder mainBinder,
                                LinkedRuleBuilder mainBuilder)
    • Method Detail

      • ignoreElement

        public NestedPropertiesBuilder ignoreElement​(java.lang.String elementName)
        Allows ignore a matching element.
        Parameters:
        elementName - The child xml element to be ignored
        Returns:
        this builder instance
      • addAlias

        @Deprecated
        public NestedPropertiesBuilder addAlias​(java.lang.String elementName,
                                                java.lang.String propertyName)
        Deprecated.
        Allows element2property mapping to be overridden.
        Parameters:
        elementName - The child xml element to match
        propertyName - The java bean property to be assigned the value
        Returns:
        this builder instance
      • addAlias

        public AddAliasBuilder<NestedPropertiesBuilder> addAlias​(java.lang.String elementName)
        Allows element2property mapping to be overridden.
        Parameters:
        elementName - The child xml element to match
        Returns:
        the property alias builder
        Since:
        3.2
      • trimData

        public NestedPropertiesBuilder trimData​(boolean trimData)
        When set to true, any text within child elements will have leading and trailing whitespace removed before assignment to the target object.
        Parameters:
        trimData - Flag to set any text within child elements will have leading and trailing whitespace removed
        Returns:
        this builder instance
      • allowUnknownChildElements

        public NestedPropertiesBuilder allowUnknownChildElements​(boolean allowUnknownChildElements)
        Determines whether an error is reported when a nested element is encountered for which there is no corresponding property-setter method.
        Parameters:
        allowUnknownChildElements - flag to ignore any child element for which there is no corresponding object property
        Returns:
        this builder instance