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
All Methods Instance Methods Concrete 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
-
withConsumer
public XMLAttribute.Builder<RC,WC> withConsumer(BiConsumer<RC,String> consumer)
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
public XMLAttribute.Builder<RC,WC> withFormatter(Function<WC,String> formatter)
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
public XMLAttribute.Builder<RC,WC> withUsage(XMLUsage usage)
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
public XMLAttribute.Builder<RC,WC> withDefaultValue(String defaultValue)
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
public XMLAttribute.Builder<RC,WC> withFixedValue(String fixedValue)
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
public XMLAttribute<RC,WC> build()
Description copied from interface:XMLAttribute.BuilderBuilds this attribute- Specified by:
buildin interfaceXMLAttribute.Builder<RC,WC>- Returns:
- an XML attribute
-
-