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

org.springframework.beans.factory.config.ConfigurableListableBeanFactory Maven / Gradle / Ivy

There is a newer version: 5.3.34
Show newest version
/*
 * Copyright 2002-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.beans.factory.config;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;

/**
 * Configuration interface to be implemented by most listable bean factories.
 * In addition to {@link ConfigurableBeanFactory}, it provides facilities to
 * analyze and modify bean definitions, and to pre-instantiate singletons.
 *
 * 

This subinterface of {@link org.springframework.beans.factory.BeanFactory} * is not meant to be used in normal application code: Stick to * {@link org.springframework.beans.factory.BeanFactory} or * {@link org.springframework.beans.factory.ListableBeanFactory} for typical * use cases. This interface is just meant to allow for framework-internal * plug'n'play even when needing access to bean factory configuration methods. * * @author Juergen Hoeller * @since 03.11.2003 * @see org.springframework.context.support.AbstractApplicationContext#getBeanFactory() */ public interface ConfigurableListableBeanFactory extends ListableBeanFactory, AutowireCapableBeanFactory, ConfigurableBeanFactory { /** * Ignore the given dependency type for autowiring: * for example, String. Default is none. * @param type the dependency type to ignore */ void ignoreDependencyType(Class type); /** * Ignore the given dependency interface for autowiring. *

This will typically be used by application contexts to register * dependencies that are resolved in other ways, like BeanFactory through * BeanFactoryAware or ApplicationContext through ApplicationContextAware. *

By default, only the BeanFactoryAware interface is ignored. * For further types to ignore, invoke this method for each type. * @param ifc the dependency interface to ignore * @see org.springframework.beans.factory.BeanFactoryAware * @see org.springframework.context.ApplicationContextAware */ void ignoreDependencyInterface(Class ifc); /** * Return the registered BeanDefinition for the given bean, allowing access * to its property values and constructor argument value (which can be * modified during bean factory post-processing). *

A returned BeanDefinition object should not be a copy but the original * definition object as registered in the factory. This means that it should * be castable to a more specific implementation type, if necessary. * @param beanName name of the bean * @return the registered BeanDefinition * @throws NoSuchBeanDefinitionException if there is no bean with the given name */ BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException; /** * Ensure that all non-lazy-init singletons are instantiated, also considering * {@link org.springframework.beans.factory.FactoryBean FactoryBeans}. * Typically invoked at the end of factory setup, if desired. * @throws BeansException if one of the singleton beans could not be created. * Note: This may have left the factory with some beans already initialized! * Call {@link #destroySingletons()} for full cleanup in this case. * @see #destroySingletons() */ void preInstantiateSingletons() throws BeansException; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy