Code example for AbstractSingleBeanDefinitionParser

0
 * Parser for the <code>&lt;oxm:xmlbeans-marshaller/&gt; element. 
 * @author Christian Dupuis 
 * @author Arjen Poutsma 
 * @since 1.5.0 
 */ 
class XmlBeansMarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
    public static final String XML_BEANS_MARSHALLER_CLASS_NAME = "org.springframework.oxm.xmlbeans.XmlBeansMarshaller";
 
    protected String getBeanClassName(Element element) {
        return XML_BEANS_MARSHALLER_CLASS_NAME;
    } 
 
    protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder beanDefinitionBuilder) {
        String optionsName = element.getAttribute("options");
        if (StringUtils.hasText(optionsName)) {
            beanDefinitionBuilder.addPropertyReference("xmlOptions", optionsName);
        } 
    } 
}