Code example for AbstractSingleBeanDefinitionParser

0
import org.w3c.dom.Element;
 
/** 
 * @author Ryan Heaton 
 */ 
public class ResourceBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected Class<?> getBeanClass(Element element) {
		String type = element.getAttribute("type");
		if ("authorization_code".equals(type)) {
			return AuthorizationCodeResourceDetails.class; 
		} 
		if ("implicit".equals(type)) {
			return ImplicitResourceDetails.class; 
		} 
		if ("client_credentials".equals(type)) {
			return ClientCredentialsResourceDetails.class; 
		} 
		if ("password".equals(type)) {
Experience pair programming with AI  Get Codota for Java