001package io.avaje.inject.aop;
002
003import java.lang.annotation.Annotation;
004import java.lang.reflect.Method;
005
006/**
007 * Provides the {@code MethodInterceptor} for the given aspect.
008 *
009 * @param <T> The aspect annotation
010 */
011@FunctionalInterface
012public interface AspectProvider<T extends Annotation> {
013
014  /**
015   * Return the method interceptor to use for the given method and aspect annotation.
016   */
017  MethodInterceptor interceptor(Method method, T aspectAnnotation);
018}