Package org.jboss.as.controller.xml
Interface XMLAttribute.Builder<RC,WC>
- All Known Implementing Classes:
XMLAttribute.DefaultBuilder
- Enclosing interface:
- XMLAttribute<RC,
WC>
public static interface XMLAttribute.Builder<RC,WC>
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds this attributewithConsumer(BiConsumer<RC, String> consumer) Specifies a consumer used to apply an attribute value to the read context.withDefaultValue(String defaultValue) Specifies a default value for this attribute, applied if the attribute is absent from the input.withFixedValue(String fixedValue) Specifies a fixed value of this attribute, applied if the attribute is absent from the input.withFormatter(Function<WC, String> formatter) Specifies a function used to format content as an attribute value.Overrides the usage of this attribute
-
Method Details
-
withUsage
Overrides the usage of this attribute- Parameters:
usage- the attribute usage- Returns:
- a reference to this builder
-
withDefaultValue
Specifies a default value for this attribute, applied if the attribute is absent from the input.- Parameters:
defaultValue- the default value of this attribute- Returns:
- a reference to this builder
-
withFixedValue
Specifies a fixed value of this attribute, applied if the attribute is absent from the input. However, if this attribute is present in the input, it must specify this fixed value.- Parameters:
defaultValue- the fixed value of this attribute- Returns:
- a reference to this builder
-
withConsumer
Specifies a consumer used to apply an attribute value to the read context.- Parameters:
consumer- consumes the attribute value into the read context- Returns:
- a reference to this builder
-
withFormatter
Specifies a function used to format content as an attribute value.- Parameters:
formatter- a function returning the attribute value of the content to be written.- Returns:
- a reference to this builder
-
build
XMLAttribute<RC,WC> build()Builds this attribute- Returns:
- an XML attribute
-