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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description XMLAttribute<RC,WC>build()Builds this attributeXMLAttribute.Builder<RC,WC>withConsumer(BiConsumer<RC,String> consumer)Specifies a consumer used to apply an attribute value to the read context.XMLAttribute.Builder<RC,WC>withDefaultValue(String defaultValue)Specifies a default value for this attribute, applied if the attribute is absent from the input.XMLAttribute.Builder<RC,WC>withFixedValue(String fixedValue)Specifies a fixed value of this attribute, applied if the attribute is absent from the input.XMLAttribute.Builder<RC,WC>withFormatter(Function<WC,String> formatter)Specifies a function used to format content as an attribute value.XMLAttribute.Builder<RC,WC>withUsage(XMLUsage usage)Overrides the usage of this attribute
-
-
-
Method Detail
-
withUsage
XMLAttribute.Builder<RC,WC> withUsage(XMLUsage usage)
Overrides the usage of this attribute- Parameters:
usage- the attribute usage- Returns:
- a reference to this builder
-
withDefaultValue
XMLAttribute.Builder<RC,WC> withDefaultValue(String defaultValue)
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
XMLAttribute.Builder<RC,WC> withFixedValue(String fixedValue)
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
XMLAttribute.Builder<RC,WC> withConsumer(BiConsumer<RC,String> consumer)
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
XMLAttribute.Builder<RC,WC> withFormatter(Function<WC,String> formatter)
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
-
-