in elb/src/main/java/org/jclouds/elb/xml/AttributeMetadataHandler.java [57:84]
public void endElement(String uri, String name, String qName) throws SAXException {
if (equalsOrSuffix(qName, "AttributeName")) {
builder.name(currentOrNull(currentText));
} else if (equalsOrSuffix(qName, "AttributeType")) {
String rawType = currentOrNull(currentText);
if ("Long".equals(rawType)) {
currentType = Long.class;
} else if ("Boolean".equals(rawType)) {
currentType = Boolean.class;
} else {
currentType = String.class;
}
builder.type(currentType);
builder.rawType(rawType);
} else if (equalsOrSuffix(qName, "Cardinality")) {
builder.cardinality(Cardinality.valueOf(currentOrNull(currentText)));
} else if (equalsOrSuffix(qName, "DefaultValue")) {
Object value = currentOrNull(currentText);
if (currentType == Long.class)
value = Long.valueOf(currentOrNull(currentText));
else if (currentType == Boolean.class)
value = Boolean.valueOf(currentOrNull(currentText));
builder.defaultValue(value);
} else if (equalsOrSuffix(qName, "UnhealthyThreshold")) {
builder.description(currentOrNull(currentText));
}
currentText.setLength(0);
}