Package org.jboss.as.controller.xml
Class XMLAttribute.DefaultBuilder<RC,WC>
java.lang.Object
org.jboss.as.controller.xml.XMLAttribute.DefaultBuilder<RC,WC>
- All Implemented Interfaces:
XMLAttribute.Builder<RC,WC>
- Enclosing interface:
- XMLAttribute<RC,
WC>
public static class XMLAttribute.DefaultBuilder<RC,WC>
extends Object
implements 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
-
withConsumer
Description copied from interface:XMLAttribute.BuilderSpecifies a consumer used to apply an attribute value to the read context.- Specified by:
withConsumerin interfaceXMLAttribute.Builder<RC,WC> - Parameters:
consumer- consumes the attribute value into the read context- Returns:
- a reference to this builder
-
withFormatter
Description copied from interface:XMLAttribute.BuilderSpecifies a function used to format content as an attribute value.- Specified by:
withFormatterin interfaceXMLAttribute.Builder<RC,WC> - Parameters:
formatter- a function returning the attribute value of the content to be written.- Returns:
- a reference to this builder
-
withUsage
Description copied from interface:XMLAttribute.BuilderOverrides the usage of this attribute- Specified by:
withUsagein interfaceXMLAttribute.Builder<RC,WC> - Parameters:
usage- the attribute usage- Returns:
- a reference to this builder
-
withDefaultValue
Description copied from interface:XMLAttribute.BuilderSpecifies a default value for this attribute, applied if the attribute is absent from the input.- Specified by:
withDefaultValuein interfaceXMLAttribute.Builder<RC,WC> - Parameters:
defaultValue- the default value of this attribute- Returns:
- a reference to this builder
-
withFixedValue
Description copied from interface:XMLAttribute.BuilderSpecifies 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.- Specified by:
withFixedValuein interfaceXMLAttribute.Builder<RC,WC> - Returns:
- a reference to this builder
-
build
Description copied from interface:XMLAttribute.BuilderBuilds this attribute- Specified by:
buildin interfaceXMLAttribute.Builder<RC,WC> - Returns:
- an XML attribute
-