Code example for AbstractSingleBeanDefinitionParser

0
 * BeanDefinitionParser that parses <snapshotter-trigger> elements. 
 * 
 * @author Allard Buijze 
 * @since 0.7 
 */ 
public class SnapshotterTriggerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
    @Override 
    protected Class getBeanClass(Element element) {
        return EventCountSnapshotterTrigger.class; 
    } 
 
    @Override 
    protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
        builder.addPropertyValue("trigger", element.getAttribute("event-count-threshold"));
        builder.addPropertyReference("snapshotter", element.getAttribute("snapshotter-ref"));
    } 
 
    @Override 
    protected boolean shouldGenerateIdAsFallback() { 
Experience pair programming with AI  Get Codota for Java