BeanDefinitionHolder getBeanDefinition - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for BeanDefinitionHolder getBeanDefinition method.

This code example shows how to use the following methods:getBeanDefinition, getBeanName
		this.definitionWrapper = new BeanWrapperImpl(bd);
		return bd;
	} 
 
	public void setBeanDefinitionHolder(BeanDefinitionHolder holder) {
		this.definition = (AbstractBeanDefinition) holder.getBeanDefinition();
		this.beanName = holder.getBeanName();
	} 
 
	public BeanDefinitionHolder getBeanDefinitionHolder() {
		return new BeanDefinitionHolder(getBeanDefinition(), getBeanName());
	} 
 
	public void setParent(Object obj) {
		if (obj == null) {
			throw new IllegalArgumentException("Parent bean cannot be set to a null runtime bean reference!");
		} 
		if (obj instanceof String) {
			this.parentName = (String) obj;
		} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBeanDefinition
	 * <p>To be considered a candidate the bean's <em>autowire-candidate</em> 
	 * attribute must not have been set to 'false'. 
	 */ 
	@Override 
	public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) {
		return bdHolder.getBeanDefinition().isAutowireCandidate();
	} 
 
	@Override 
	public Object getSuggestedValue(DependencyDescriptor descriptor) {
		return null; 
	} 
 
	@Override 
	public Object getLazyResolutionProxyIfNecessary(DependencyDescriptor descriptor, String beanName) {
		return null; 
	} 
 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBeanDefinition
		return beanDefinition;
	} 
 
	@Override 
	protected void registerBeanDefinition(BeanDefinitionHolder definition, BeanDefinitionRegistry registry) {
		String scope = definition.getBeanDefinition().getScope();
		if (!AbstractBeanDefinition.SCOPE_DEFAULT.equals(scope) && !AbstractBeanDefinition.SCOPE_SINGLETON.equals(scope) && !AbstractBeanDefinition.SCOPE_PROTOTYPE.equals(scope)) {
			definition = ScopedProxyUtils.createScopedProxy(definition, registry, false);
		} 
		super.registerBeanDefinition(definition, registry);
	} 
 
	/** 
	 * Subclasses must implement this method to create the bean definition. 
	 * The class must be defined, and any implementation-specific constructor 
	 * arguments or properties should be configured. This base class will 
	 * configure the interceptors including the 'datatype' interceptor if 
	 * the 'datatype' attribute is defined on the channel element. 
	 * 
	 * @param element The element. 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBeanDefinition
	private static class ObjectNameBeanDefinitionDecorator implements BeanDefinitionDecorator { 
 
		@Override 
		public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definition, ParserContext parserContext) { 
			Attr objectNameAttribute = (Attr) node; 
			definition.getBeanDefinition().setAttribute("objectName", objectNameAttribute.getValue()); 
			return definition; 
		} 
	} 
} 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBeanDefinition
	 * fallback to match against the bean name or an alias if a qualifier or 
	 * attribute does not match. 
	 * @see Qualifier 
	 */ 
	public boolean isAutowireCandidate(BeanDefinitionHolder bdHolder, DependencyDescriptor descriptor) {
		if (!bdHolder.getBeanDefinition().isAutowireCandidate()) {
			// if explicitly false, do not proceed with qualifier check 
			return false; 
		} 
		if (descriptor == null) {
			// no qualification necessary 
			return true; 
		} 
		boolean match = checkQualifiers(bdHolder, descriptor.getAnnotations());
		if (match) {
			MethodParameter methodParam = descriptor.getMethodParameter();
			if (methodParam != null) {
				Method method = methodParam.getMethod();
				if (method == null || void.class.equals(method.getReturnType())) {
					match = checkQualifiers(bdHolder, methodParam.getMethodAnnotations());
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBeanDefinition, getBeanName
This code example shows how to use the following methods:getBeanDefinition
 
    @Override 
    protected void registerBeanDefinition(BeanDefinitionHolder definitionHolder, BeanDefinitionRegistry registry) {
        try { 
            @SuppressWarnings({"unchecked"}) 
            Class<? extends Page> clazz = (Class<? extends Page>) Class.forName(definitionHolder.getBeanDefinition().getBeanClassName());
            if (clazz.isAnnotationPresent(ModulePage.class)) {
                moduleConfiguration.addPageConfiguration(new PageConfiguration(clazz));
            } 
            else if (clazz.isAnnotationPresent(NavigationBox.class)) {
                moduleConfiguration.addBox(new BoxConfiguration(clazz));
            } 
            else if (clazz.isAnnotationPresent(GenericRepository.class)) {
                BeanDefinitionHolder beanDefinitionHolder = buildGenericRepositoryDefinition(clazz);
                super.registerBeanDefinition(beanDefinitionHolder, registry);
            } 
            else if (clazz.isAnnotationPresent(Entity.class)
                    || clazz.isAnnotationPresent(org.hibernate.annotations.Entity.class)) {
                moduleConfiguration.addEntity(clazz);
                if (clazz.isAnnotationPresent(RegisterGenericDataProvider.class)) {
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getBeanDefinition
        if (logger.isDebugEnabled())
        { 
            logger.debug("parsing: " + SpringXMLUtils.elementToString(element));
        } 
        if (SpringXMLUtils.isBeansNamespace(element))
        { 
            return handleSpringElements(element, parent);
        } 
        else 
        { 
            String namespaceUri = element.getNamespaceURI();
            NamespaceHandler handler = getReaderContext().getNamespaceHandlerResolver().resolve(namespaceUri);
            if (handler == null)
            { 
                getReaderContext().error("Unable to locate NamespaceHandler for namespace [" + namespaceUri + "]", element);
                return null; 
            } 
 
            boolean noRecurse = false;
            boolean forceRecurse = false;
4
CodeRank
Experience pair programming with AI  Get Codota for Java
getBeanDefinition Method Overview
Return the wrapped BeanDefinition.
See Code Examples for other Spring Framework BeanDefinitionHolder Methods: