All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.kubek2k.mockito.spring.MockitoSpyBeanDefinitionParser Maven / Gradle / Ivy

package org.kubek2k.mockito.spring;

import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.w3c.dom.Element;

public class MockitoSpyBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {

    @Override
    protected String getBeanClassName(Element element) {
        return "org.kubek2k.mockito.spring.MockitoSpyBeanPostProcessor";
    }

    @Override
    protected void doParse(Element element, BeanDefinitionBuilder beanBuilder) {
        beanBuilder.addPropertyValue("beanName", element.getAttribute("beanName"));
    }
    
    @Override
    protected boolean shouldGenerateIdAsFallback() {
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy