Class NestedPropertiesBuilder

    • 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<NestedPropertiesBuilderaddAlias​(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
      • getNamespaceURI

        public final java.lang.String getNamespaceURI()
        Returns the namespace URI for which this Rule is relevant, if any.
        Returns:
        The namespace URI for which this Rule is relevant, if any
      • get

        public final R get()
        Provides an instance of Rule. Must never return null.
        Specified by:
        get in interface RuleProvider<R extends Rule>
        Returns:
        an instance of Rule.
      • reportError

        protected final void reportError​(java.lang.String methodChain,
                                         java.lang.String message)
      • getPattern

        public final java.lang.String getPattern()
        Returns the rule pattern associated to this builder.
        Returns:
        The rule pattern associated to this builder