All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.avaje.inject.aop.MethodInterceptor Maven / Gradle / Ivy

There is a newer version: 10.6-javax
Show newest version
package io.avaje.inject.aop;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;

/**
 * Provides method interception logic that can be executed before, during, and after a method invocation.
 * 

* MethodInterceptor instances are provided by {@link AspectProvider#interceptor(Method, Annotation)}. */ @FunctionalInterface public interface MethodInterceptor { /** * Intercepts the method invocation. *

* If the interceptor wants to replace the result, it can be done via {@link Invocation#result(Object)}. * * @param invocation The invocation being intercepted * @throws Throwable If the interception or underlying invocation throws an exception */ void invoke(Invocation invocation) throws Throwable; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy