Code example for AbstractSingleBeanDefinitionParser

0
 
/** 
 * @author Dave Syer 
 *  
 */ 
public class RestTemplateBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected Class<?> getBeanClass(Element element) {
		return OAuth2RestTemplate.class; 
	} 
 
	@Override 
	protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
 
		String accessTokenProviderRef = element.getAttribute("access-token-provider");
		 
		builder.addConstructorArgReference(element.getAttribute("resource"));
 
		BeanDefinitionBuilder request = BeanDefinitionBuilder.genericBeanDefinition(DefaultAccessTokenRequest.class);
Experience pair programming with AI  Get Codota for Java