@HashCodeAndEqualsPlugin.Enhance public static class Advice.AssignReturned.Factory extends Object implements Advice.PostProcessor.Factory
Advice.AssignReturned
post processor. This processor is only added if the advice
method does not return void
.Advice.PostProcessor.Factory.Compound
Modifier | Constructor and Description |
---|---|
|
Factory()
Creates a new factory which a preresolved list of handler factories.
|
protected |
Factory(List<? extends Advice.AssignReturned.Handler.Factory<?>> factories,
Advice.AssignReturned.ExceptionHandler.Factory exceptionHandlerFactory)
Creates a new factory.
|
Modifier and Type | Method and Description |
---|---|
Advice.PostProcessor |
make(MethodDescription.InDefinedShape advice,
boolean exit)
Creates a post processor for a given advice method.
|
Advice.AssignReturned.Factory |
with(Advice.AssignReturned.Handler.Factory<?> factory)
Includes the provided handler factory.
|
Advice.AssignReturned.Factory |
with(Class<? extends Annotation> type,
Advice.AssignReturned.Handler... handler)
Includes a list of handlers upon discovering an annotation of a given type.
|
Advice.AssignReturned.Factory |
with(Class<? extends Annotation> type,
List<Advice.AssignReturned.Handler> handlers)
Includes a list of handlers upon discovering an annotation of a given type.
|
Advice.PostProcessor.Factory |
withSuppressed(Class<? extends Throwable> exceptionType)
Configures this post processor to handle exceptions during assignment with the advice's
Advice.ExceptionHandler . |
Advice.PostProcessor.Factory |
withSuppressed(TypeDescription exceptionType)
Configures this post processor to handle exceptions during assignment with the advice's
Advice.ExceptionHandler . |
public Factory()
protected Factory(List<? extends Advice.AssignReturned.Handler.Factory<?>> factories, Advice.AssignReturned.ExceptionHandler.Factory exceptionHandlerFactory)
factories
- The handler factories to apply.exceptionHandlerFactory
- The exception handler factory to use.public Advice.AssignReturned.Factory with(Class<? extends Annotation> type, Advice.AssignReturned.Handler... handler)
type
- The annotation type that activates the handler factory.handler
- The handlers to use upon discovery.Advice.AssignReturned.Factory
that includes the provided handlers.public Advice.AssignReturned.Factory with(Class<? extends Annotation> type, List<Advice.AssignReturned.Handler> handlers)
type
- The annotation type that activates the handler factory.handlers
- The handlers to use upon discovery.Advice.AssignReturned.Factory
that includes the provided handlers.public Advice.AssignReturned.Factory with(Advice.AssignReturned.Handler.Factory<?> factory)
factory
- The handler factory to include.Advice.AssignReturned.Factory
that includes the provided handler factory.public Advice.PostProcessor.Factory withSuppressed(Class<? extends Throwable> exceptionType)
Advice.ExceptionHandler
.exceptionType
- The Throwable
type to handle.public Advice.PostProcessor.Factory withSuppressed(TypeDescription exceptionType)
Advice.ExceptionHandler
.exceptionType
- The Throwable
type to handle.public Advice.PostProcessor make(MethodDescription.InDefinedShape advice, boolean exit)
make
in interface Advice.PostProcessor.Factory
advice
- The advice method to create the post processor for.exit
- true
if the advice is exit advice.Copyright © 2014–2024. All rights reserved.