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.aop.aspectj.annotation; 018 019import org.springframework.aop.aspectj.AspectInstanceFactory; 020 021/** 022 * Subinterface of {@link org.springframework.aop.aspectj.AspectInstanceFactory} 023 * that returns {@link AspectMetadata} associated with AspectJ-annotated classes. 024 * 025 * <p>Ideally, AspectInstanceFactory would include this method itself, but because 026 * AspectMetadata uses Java-5-only {@link org.aspectj.lang.reflect.AjType}, 027 * we need to split out this subinterface. 028 * 029 * @author Rod Johnson 030 * @since 2.0 031 * @see AspectMetadata 032 * @see org.aspectj.lang.reflect.AjType 033 */ 034public interface MetadataAwareAspectInstanceFactory extends AspectInstanceFactory { 035 036 /** 037 * Return the AspectJ AspectMetadata for this factory's aspect. 038 * @return the aspect metadata 039 */ 040 AspectMetadata getAspectMetadata(); 041 042 /** 043 * Return the best possible creation mutex for this factory. 044 * @return the mutex object (may be {@code null} for no mutex to use) 045 * @since 4.3 046 */ 047 Object getAspectCreationMutex(); 048 049}