001/* 002 * Copyright 2002-2012 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.wiring; 018 019/** 020 * Strategy interface to be implemented by objects than can resolve bean name 021 * information, given a newly instantiated bean object. Invocations to the 022 * {@link #resolveWiringInfo} method on this interface will be driven by 023 * the AspectJ pointcut in the relevant concrete aspect. 024 * 025 * <p>Metadata resolution strategy can be pluggable. A good default is 026 * {@link ClassNameBeanWiringInfoResolver}, which uses the fully-qualified 027 * class name as bean name. 028 * 029 * @author Rod Johnson 030 * @since 2.0 031 * @see BeanWiringInfo 032 * @see ClassNameBeanWiringInfoResolver 033 * @see org.springframework.beans.factory.annotation.AnnotationBeanWiringInfoResolver 034 */ 035public interface BeanWiringInfoResolver { 036 037 /** 038 * Resolve the BeanWiringInfo for the given bean instance. 039 * @param beanInstance the bean instance to resolve info for 040 * @return the BeanWiringInfo, or {@code null} if not found 041 */ 042 BeanWiringInfo resolveWiringInfo(Object beanInstance); 043 044}