public void processNestedTag(PutTag nestedTag) throws JspException {
// Get real value and check role
// If role is set, add it in attribute definition if any.
// If no attribute definition, create untyped one and set role.
Object attributeValue = nestedTag.getRealValue();
AttributeDefinition def;
if (nestedTag.getRole() != null) {
try {
def = ((AttributeDefinition) attributeValue);
} catch (ClassCastException ex) {
def = new UntypedAttribute(attributeValue);
}
def.setRole(nestedTag.getRole());
attributeValue = def;
}
// now add attribute to enclosing parent (i.e. : this object)
putAttribute(nestedTag.getName(), attributeValue);