Class SynchronousInterceptedMethod
- java.lang.Object
-
- io.micronaut.aop.internal.intercepted.SynchronousInterceptedMethod
-
- All Implemented Interfaces:
InterceptedMethod
@Internal public class SynchronousInterceptedMethod extends java.lang.Object implements InterceptedMethod
The synchronous method intercept.- Since:
- 2.1.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.micronaut.aop.InterceptedMethod
InterceptedMethod.ResultType
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <E extends java.lang.Throwable>
java.lang.ObjecthandleException(java.lang.Exception exception)Handle the exception that should be thrown out of the invocation.java.lang.ObjecthandleResult(java.lang.Object result)Handle the value that should be the result of the invocation.java.lang.ObjectinterceptResult()Proceeds with invocation ofInvocationContext.proceed()and converts result to appropriate type.java.lang.ObjectinterceptResult(Interceptor<?,?> from)Proceeds with invocation ofInvocationContext.proceed(Interceptor)and converts result to appropriate type.InterceptedMethod.ResultTyperesultType()Returns result type of the method.io.micronaut.core.type.Argument<?>returnTypeValue()Returns result type value.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.micronaut.aop.InterceptedMethod
interceptResultAsCompletionStage, interceptResultAsCompletionStage, interceptResultAsPublisher, interceptResultAsPublisher, interceptResultAsPublisher, unsupported
-
-
-
-
Method Detail
-
resultType
public InterceptedMethod.ResultType resultType()
Description copied from interface:InterceptedMethodReturns result type of the method.- Specified by:
resultTypein interfaceInterceptedMethod- Returns:
- The
InterceptedMethod.ResultType
-
returnTypeValue
public io.micronaut.core.type.Argument<?> returnTypeValue()
Description copied from interface:InterceptedMethodReturns result type value.- Specified by:
returnTypeValuein interfaceInterceptedMethod- Returns:
- The return type value.
-
interceptResult
public java.lang.Object interceptResult()
Description copied from interface:InterceptedMethodProceeds with invocation ofInvocationContext.proceed()and converts result to appropriate type.- Specified by:
interceptResultin interfaceInterceptedMethod- Returns:
- The intercepted result
-
interceptResult
public java.lang.Object interceptResult(Interceptor<?,?> from)
Description copied from interface:InterceptedMethodProceeds with invocation ofInvocationContext.proceed(Interceptor)and converts result to appropriate type.- Specified by:
interceptResultin interfaceInterceptedMethod- Parameters:
from- The interceptor to start from- Returns:
- The intercepted result
-
handleResult
public java.lang.Object handleResult(java.lang.Object result)
Description copied from interface:InterceptedMethodHandle the value that should be the result of the invocation.- Specified by:
handleResultin interfaceInterceptedMethod- Parameters:
result- The result of the invocation- Returns:
- The result of the invocation being returned from the interceptor
-
handleException
public <E extends java.lang.Throwable> java.lang.Object handleException(java.lang.Exception exception) throws E extends java.lang.ThrowableDescription copied from interface:InterceptedMethodHandle the exception that should be thrown out of the invocation.- Specified by:
handleExceptionin interfaceInterceptedMethod- Type Parameters:
E- Sneaky throws helper- Parameters:
exception- The exception- Returns:
- The result of the invocation being returned from the interceptor
- Throws:
E- The exceptionE extends java.lang.Throwable
-
-