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.aop.aspectj; 018 019import org.springframework.core.Ordered; 020 021/** 022 * Interface implemented to provide an instance of an AspectJ aspect. 023 * Decouples from Spring's bean factory. 024 * 025 * <p>Extends the {@link org.springframework.core.Ordered} interface 026 * to express an order value for the underlying aspect in a chain. 027 * 028 * @author Rod Johnson 029 * @author Juergen Hoeller 030 * @since 2.0 031 * @see org.springframework.beans.factory.BeanFactory#getBean 032 */ 033public interface AspectInstanceFactory extends Ordered { 034 035 /** 036 * Create an instance of this factory's aspect. 037 * @return the aspect instance (never {@code null}) 038 */ 039 Object getAspectInstance(); 040 041 /** 042 * Expose the aspect class loader that this factory uses. 043 * @return the aspect class loader (never {@code null}) 044 */ 045 ClassLoader getAspectClassLoader(); 046 047}