// set attributes
for (Map.Entry<String, String> entry : getAttributes().entrySet()) {
String attributeName = entry.getKey();
GAttributeInfo attributeInfo = gbeanInfo.getAttribute(attributeName);
if (attributeInfo == null) {
throw new InvalidConfigException("No attribute: " + attributeName + " for gbean: " + data.getAbstractName());
}
String valueString = entry.getValue();
Object value = getValue(attributeInfo, valueString, configName, gbeanName, classLoader);
data.setAttribute(attributeName, value);
}
//Clear attributes
for (String attribute : getClearAttributes()) {
data.clearAttribute(attribute);
}
//Null attributes
for (String attribute : getNullAttributes()) {
data.setAttribute(attribute, null);
}
// set references
for (Map.Entry<String, ReferencePatterns> entry : getReferences().entrySet()) {
String referenceName = entry.getKey();
GReferenceInfo referenceInfo = gbeanInfo.getReference(referenceName);
if (referenceInfo == null) {
throw new InvalidConfigException("No reference: " + referenceName + " for gbean: " + data.getAbstractName());
}
ReferencePatterns referencePatterns = entry.getValue();
data.setReferencePatterns(referenceName, referencePatterns);