KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Copyright 2002-2007 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 java.beans.PropertyDescriptor JavaDoc;
20
21 import org.springframework.beans.BeansException;
22 import org.springframework.beans.PropertyValues;
23
24 /**
25  * Adapter implementing all methods on {@link SmartInstantiationAwareBeanPostProcessor}
26  * as no-ops, which will not change normal processing of each bean instantiated
27  * by the container. Subclasses may override merely those methods that they are
28  * actually interested in.
29  *
30  * @author Rod Johnson
31  * @author Juergen Hoeller
32  * @since 2.0
33  */

34 public abstract class InstantiationAwareBeanPostProcessorAdapter implements SmartInstantiationAwareBeanPostProcessor {
35
36     public Class JavaDoc predictBeanType(Class JavaDoc beanClass, String JavaDoc beanName) {
37         return null;
38     }
39
40     public Object JavaDoc postProcessBeforeInstantiation(Class JavaDoc beanClass, String JavaDoc beanName) throws BeansException {
41         return null;
42     }
43
44     public boolean postProcessAfterInstantiation(Object JavaDoc bean, String JavaDoc beanName) throws BeansException {
45         return true;
46     }
47
48     public PropertyValues postProcessPropertyValues(
49             PropertyValues pvs, PropertyDescriptor JavaDoc[] pds, Object JavaDoc bean, String JavaDoc beanName)
50             throws BeansException {
51
52         return pvs;
53     }
54
55     public Object JavaDoc postProcessBeforeInitialization(Object JavaDoc bean, String JavaDoc beanName) throws BeansException {
56         return bean;
57     }
58
59     public Object JavaDoc postProcessAfterInitialization(Object JavaDoc bean, String JavaDoc beanName) throws BeansException {
60         return bean;
61     }
62
63 }
64
Popular Tags