T - the delegate typepublic static interface Aspects.InterceptBuilder<T>
| Modifier and Type | Method and Description |
|---|---|
Aspects.InterceptBuilder<T> |
after(BiFunctionWithException<Aspects.Invocation,Object,Object> after)
Provide a function that is called after the method is called.
|
Aspects.InterceptBuilder<T> |
around(BiFunctionWithException<Aspects.Invocation,Callable<Object>,Object> around)
Provide a function that is called with the method calling function.
|
Aspects.InterceptBuilder<T> |
before(ConsumerWithException<Aspects.Invocation> before)
Provide a function that is called before the method is called.
|
T |
build()
Build the proxy
|
<A,B,R> Aspects.InterceptBuilder<T> |
intercept(BiFunctionWithException<A,B,R> intercept,
String name,
Class<A> aType,
Class<B> bType)
Intercept a two argument method call
|
<A,R> Aspects.InterceptBuilder<T> |
intercept(FunctionWithException<A,R> intercept,
String name,
Class<A> type)
Intercept a one argument method call
|
Aspects.InterceptBuilder<T> |
intercept(FunctionWithException<Aspects.Invocation,Object> intercept,
String name,
Class<?>... types)
Intercept a method call with a lambda.
|
<R> Aspects.InterceptBuilder<T> |
intercept(RunnableWithException intercept,
String name)
Intercept a no method call
|
<R> Aspects.InterceptBuilder<T> |
intercept(SupplierWithException<R> intercept,
String name)
Intercept a no method call
|
Aspects.InterceptBuilder<T> |
onException(BiFunctionWithException<Aspects.Invocation,Throwable,Object> exception)
Called when an exception occurs
|
Aspects.InterceptBuilder<T> intercept(FunctionWithException<Aspects.Invocation,Object> intercept, String name, Class<?>... types)
intercept - the lambda to interceptname - the method nametypes - the types<R> Aspects.InterceptBuilder<T> intercept(SupplierWithException<R> intercept, String name)
intercept - the no method lambdaname - the name of the method without arguments<R> Aspects.InterceptBuilder<T> intercept(RunnableWithException intercept, String name)
intercept - the no method lambdaname - the name of the method without arguments<A,R> Aspects.InterceptBuilder<T> intercept(FunctionWithException<A,R> intercept, String name, Class<A> type)
intercept - the one argument method lambdaname - the name of the method with one argument<A,B,R> Aspects.InterceptBuilder<T> intercept(BiFunctionWithException<A,B,R> intercept, String name, Class<A> aType, Class<B> bType)
intercept - the two argument method lambdaname - the name of the method with two argumentsAspects.InterceptBuilder<T> around(BiFunctionWithException<Aspects.Invocation,Callable<Object>,Object> around)
around - the around advice (the argument is a callable that
should be calleAspects.InterceptBuilder<T> before(ConsumerWithException<Aspects.Invocation> before)
before - adviceAspects.InterceptBuilder<T> after(BiFunctionWithException<Aspects.Invocation,Object,Object> after)
after - adviceAspects.InterceptBuilder<T> onException(BiFunctionWithException<Aspects.Invocation,Throwable,Object> exception)
exception - the throw exceptionT build()
Copyright © 2021. All rights reserved.