001/* 002 * Copyright 2002-2016 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.beans.factory.support; 018 019import org.springframework.beans.factory.config.BeanPostProcessor; 020 021/** 022 * Post-processor callback interface for <i>merged</i> bean definitions at runtime. 023 * {@link BeanPostProcessor} implementations may implement this sub-interface in order 024 * to post-process the merged bean definition (a processed copy of the original bean 025 * definition) that the Spring {@code BeanFactory} uses to create a bean instance. 026 * 027 * <p>The {@link #postProcessMergedBeanDefinition} method may for example introspect 028 * the bean definition in order to prepare some cached metadata before post-processing 029 * actual instances of a bean. It is also allowed to modify the bean definition but 030 * <i>only</i> for definition properties which are actually intended for concurrent 031 * modification. Essentially, this only applies to operations defined on the 032 * {@link RootBeanDefinition} itself but not to the properties of its base classes. 033 * 034 * @author Juergen Hoeller 035 * @since 2.5 036 * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#getMergedBeanDefinition 037 */ 038public interface MergedBeanDefinitionPostProcessor extends BeanPostProcessor { 039 040 /** 041 * Post-process the given merged bean definition for the specified bean. 042 * @param beanDefinition the merged bean definition for the bean 043 * @param beanType the actual type of the managed bean instance 044 * @param beanName the name of the bean 045 */ 046 void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName); 047 048}