Search in sources :

Example 1 with ListAttributeDefinition

use of org.jboss.as.controller.ListAttributeDefinition in project wildfly by wildfly.

the class Messaging13SubsystemParser method handleSingleAttribute.

static void handleSingleAttribute(final XMLExtendedStreamReader reader, final Element element, final String modelName, String attributeName, final ModelNode node) throws XMLStreamException {
    AttributeDefinition attributeDefinition = element.getDefinition(modelName);
    final String value = readStringAttributeElement(reader, attributeName);
    if (attributeDefinition instanceof SimpleAttributeDefinition) {
        ((SimpleAttributeDefinition) attributeDefinition).parseAndSetParameter(value, node, reader);
    } else if (attributeDefinition instanceof ListAttributeDefinition) {
        ((ListAttributeDefinition) attributeDefinition).parseAndAddParameterElement(value, node, reader);
    }
}
Also used : ListAttributeDefinition(org.jboss.as.controller.ListAttributeDefinition) AttributeDefinition(org.jboss.as.controller.AttributeDefinition) SimpleAttributeDefinition(org.jboss.as.controller.SimpleAttributeDefinition) ListAttributeDefinition(org.jboss.as.controller.ListAttributeDefinition) SimpleAttributeDefinition(org.jboss.as.controller.SimpleAttributeDefinition)

Aggregations

AttributeDefinition (org.jboss.as.controller.AttributeDefinition)1 ListAttributeDefinition (org.jboss.as.controller.ListAttributeDefinition)1 SimpleAttributeDefinition (org.jboss.as.controller.SimpleAttributeDefinition)1