Code example for AbstractSingleBeanDefinitionParser

0
 * Parser for the <code>&lt;oxm:jaxb2-marshaller/&gt; element. 
 * @author Christian Dupuis 
 * @author Arjen Poutsma 
 * @since 1.5.0 
 */ 
class Jaxb2MarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
    private static final String JAXB2_MARSHALLER_CLASS_NAME = "org.springframework.oxm.jaxb.Jaxb2Marshaller";
 
    protected String getBeanClassName(Element element) {
        return JAXB2_MARSHALLER_CLASS_NAME;
    } 
 
    protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder beanDefinitionBuilder) {
        String contextPath = element.getAttribute("contextPath");
        if (StringUtils.hasText(contextPath)) {
            beanDefinitionBuilder.addPropertyValue("contextPath", contextPath);
        } 
        List classes = DomUtils.getChildElementsByTagName(element, "class-to-be-bound");
        if (!classes.isEmpty()) {