001/*
002 * Copyright 2002-2018 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.aop.framework;
018
019import java.lang.reflect.Method;
020import java.util.List;
021
022import org.springframework.lang.Nullable;
023
024/**
025 * Factory interface for advisor chains.
026 *
027 * @author Rod Johnson
028 * @author Juergen Hoeller
029 */
030public interface AdvisorChainFactory {
031
032        /**
033         * Determine a list of {@link org.aopalliance.intercept.MethodInterceptor} objects
034         * for the given advisor chain configuration.
035         * @param config the AOP configuration in the form of an Advised object
036         * @param method the proxied method
037         * @param targetClass the target class (may be {@code null} to indicate a proxy without
038         * target object, in which case the method's declaring class is the next best option)
039         * @return a List of MethodInterceptors (may also include InterceptorAndDynamicMethodMatchers)
040         */
041        List<Object> getInterceptorsAndDynamicInterceptionAdvice(Advised config, Method method, @Nullable Class<?> targetClass);
042
043}