public BeanDefinitionHolder decorateBeanDefinitionIfRequired(Element ele,
      BeanDefinitionHolder definitionHolder, BeanDefinition containingBd) {

    BeanDefinitionHolder finalDefinition = definitionHolder;

    // Decorate based on custom attributes first.
    NamedNodeMap attributes = ele.getAttributes();
    for (int i = 0; i < attributes.getLength(); i++) {
      Node node = attributes.item(i);
      finalDefinition = decorateIfRequired(node, finalDefinition, containingBd);
    }

    // Decorate based on custom nested elements.
    NodeList children = ele.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
      Node node = children.item(i);
      if (node.getNodeType() == Node.ELEMENT_NODE)
        finalDefinition = decorateIfRequired(node, finalDefinition, containingBd);
    }
    return finalDefinition;
  }
public BeanDefinitionHolder decorateBeanDefinitionIfRequired ( Element ele , BeanDefinitionHolder definitionHolder , BeanDefinition containingBd ) { BeanDefinitionHolder finalDefinition = definitionHolder ; NamedNodeMap attributes = ele . getAttributes ( ) ; for ( int i = 0 ; i < attributes . getLength ( ) ; i ++ ) { Node node = attributes . item ( i ) ; finalDefinition = decorateIfRequired ( node , finalDefinition , containingBd ) ; } NodeList children = ele . getChildNodes ( ) ; for ( int i = 0 ; i < children . getLength ( ) ; i ++ ) { Node node = children . item ( i ) ; if ( node . getNodeType ( ) == Node . ELEMENT_NODE ) finalDefinition = decorateIfRequired ( node , finalDefinition , containingBd ) ; } return finalDefinition ; }
<p>
decorateBeanDefinitionIfRequired.
</p>

@param ele a {@link org.w3c.dom.Element} object.
@param definitionHolder a {@link org.springframework.beans.factory.config.BeanDefinitionHolder}
object.
@param containingBd a {@link org.springframework.beans.factory.config.BeanDefinition} object.
@return a {@link org.springframework.beans.factory.config.BeanDefinitionHolder} object.