/** * Parses the supplied {@link Element} by delegating to the {@link BeanDefinitionParser} that is registered for that * {@link Element}. * * @param element the element to be parsed into a bean definition * @param parserContext the context within which the bean definition is created * * @return the bean definition created from the given element */ @Override public BeanDefinition parse(final Element element, final ParserContext parserContext) { return findParserForElement(element).parse(element, parserContext); }
/** * Decorates the supplied {@link Node} by delegating to the {@link BeanDefinitionDecorator} that is registered to * handle that {@link Node}. * * @param node the node decorating a the given bean definition * @param definition the bean being decorated * @param parserContext the current parser context * * @return the decorated bean definition */ @Override public BeanDefinitionHolder decorate(final Node node, final BeanDefinitionHolder definition, final ParserContext parserContext) { return findDecoratorForNode(node).decorate(node, definition, parserContext); }