Class SetPropertiesBuilder

All Implemented Interfaces:
RuleProvider<SetPropertiesRule>

public final class SetPropertiesBuilder extends AbstractBackToLinkedRuleBuilder<SetPropertiesRule>
Builder chained when invoking LinkedRuleBuilder.setProperties().
  • Field Details

    • aliases

      private final Map<String,String> aliases
    • ignoreMissingProperty

      private boolean ignoreMissingProperty
  • Constructor Details

  • Method Details

    • addAlias

      @Deprecated public SetPropertiesBuilder addAlias(String attributeName, String propertyName)
      Deprecated.
      Add an additional attribute name to property name mapping.
      Parameters:
      attributeName - The attribute to match
      propertyName - The java bean property to be assigned the value
      Returns:
      this builder instance
    • addAlias

      public AddAliasBuilder<SetPropertiesBuilder> addAlias(String attributeName)
      Add an additional attribute name to property name mapping.
      Parameters:
      attributeName - The attribute to match
      Returns:
      the property alias builder
      Since:
      3.2
    • ignoreAttribute

      public SetPropertiesBuilder ignoreAttribute(String attributeName)
      Add an attribute name to the ignore list.
      Parameters:
      attributeName - The attribute to match has to be ignored
      Returns:
      this builder instance
    • ignoreMissingProperty

      public SetPropertiesBuilder ignoreMissingProperty(boolean ignoreMissingProperty)
      Sets whether attributes found in the XML without matching properties should be ignored. If set to false, the parsing will throw an NoSuchMethodException if an unmatched attribute is found. This allows to trap misspellings in the XML file.
      Parameters:
      ignoreMissingProperty - false to stop the parsing on unmatched attributes
      Returns:
      this builder instance
    • createRule

      protected SetPropertiesRule createRule()
      Provides an instance of Rule. Must never return null.
      Specified by:
      createRule in class AbstractBackToLinkedRuleBuilder<SetPropertiesRule>
      Returns:
      an instance of Rule.
      See Also: