KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > beans > factory > config > BeanFactoryPostProcessor


1 /*
2  * Copyright 2002-2005 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.beans.factory.config;
18
19 import org.springframework.beans.BeansException;
20
21 /**
22  * Allows for custom modification of an application context's bean definitions,
23  * adapting the bean property values of the context's underlying bean factory.
24  *
25  * <p>Application contexts can auto-detect BeanFactoryPostProcessor beans in
26  * their bean definitions and apply them before any other beans get created.
27  *
28  * <p>Useful for custom config files targeted at system administrators that
29  * override bean properties configured in the application context.
30  *
31  * <p>See PropertyResourceConfigurer and its concrete implementations
32  * for out-of-the-box solutions that address such configuration needs.
33  *
34  * @author Juergen Hoeller
35  * @since 06.07.2003
36  * @see BeanPostProcessor
37  * @see PropertyResourceConfigurer
38  */

39 public interface BeanFactoryPostProcessor {
40
41     /**
42      * Modify the application context's internal bean factory after its standard
43      * initialization. All bean definitions will have been loaded, but no beans
44      * will have been instantiated yet. This allows for overriding or adding
45      * properties even to eager-initializing beans.
46      * @param beanFactory the bean factory used by the application context
47      * @throws org.springframework.beans.BeansException in case of errors
48      */

49     void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException;
50
51 }
52
Popular Tags