@SuppressWarnings("unchecked")
Map<DefDescriptor<AttributeDef>, Object> lazyAttributes = (Map<DefDescriptor<AttributeDef>, Object>) getAttributeDefRef(
"attributes").getValue();
for (DefDescriptor<AttributeDef> at : lazyAttributes.keySet()) {
AttributeDef other = def.getAttributeDef(at.getName());
if (other == null) {
throw new InvalidReferenceException(String.format("Attribute %s does not exist", at.getName()),
getLocation());
}
DefDescriptor<TypeDef> otherType = other.getTypeDef().getDescriptor();
if (!(otherType.getPrefix().equals("aura") && acceptableAttributeTypes.contains(otherType.getName()))) {
throw new InvalidReferenceException(
String.format(
"Lazy Component References can only have attributes of simple types passed in (%s is not simple)",
at.getName()), getLocation());