@Override
 public void marshallAsElement(ModelNode resourceModel, XMLStreamWriter writer)
     throws XMLStreamException {
   if (isMarshallable(resourceModel)) {
     writer.writeEmptyElement(getXmlName());
     writer.writeAttribute(attribute.getLocalName(), resourceModel.get(getName()).asString());
   }
 }
Example #2
0
 static {
   final Map<String, Attribute> map = new HashMap<String, Attribute>();
   for (Attribute element : values()) {
     final String name = element.getLocalName();
     if (name != null) map.put(name, element);
   }
   MAP = map;
 }