@HashCodeAndEqualsPlugin.Enhance protected static class Advice.AssignReturned.ForArray extends Advice.AssignReturned
Advice.AssignReturned
that works on the value of an array.Advice.AssignReturned.AsScalar, Advice.AssignReturned.DefaultValueSkip, Advice.AssignReturned.ExceptionHandler, Advice.AssignReturned.Factory, Advice.AssignReturned.ForArray, Advice.AssignReturned.ForScalar, Advice.AssignReturned.Handler, Advice.AssignReturned.ToAllArguments, Advice.AssignReturned.ToArguments, Advice.AssignReturned.ToFields, Advice.AssignReturned.ToReturned, Advice.AssignReturned.ToThis, Advice.AssignReturned.ToThrown
Advice.PostProcessor.Compound, Advice.PostProcessor.NoOp
exceptionHandlerFactory, exit, NO_INDEX, skipOnDefaultValue, typeDescription
Modifier | Constructor and Description |
---|---|
protected |
ForArray(TypeDescription typeDescription,
Advice.AssignReturned.ExceptionHandler.Factory exceptionHandlerFactory,
boolean exit,
Collection<List<Advice.AssignReturned.Handler>> handlers)
Creates a post processor to assign a returned array value by index.
|
Modifier and Type | Method and Description |
---|---|
protected Collection<Advice.AssignReturned.Handler> |
getHandlers()
Returns a collection of all handlers to apply.
|
protected TypeDescription |
getType()
Returns the assigned type that is handled by any handler.
|
protected StackManipulation |
toLoadInstruction(Advice.AssignReturned.Handler handler,
int offset)
Creates a load instruction for the given handler.
|
resolve
protected ForArray(TypeDescription typeDescription, Advice.AssignReturned.ExceptionHandler.Factory exceptionHandlerFactory, boolean exit, Collection<List<Advice.AssignReturned.Handler>> handlers)
typeDescription
- The array type that is returned by the advice method.exceptionHandlerFactory
- The exception handler factory to use.exit
- true
if the post processor is applied to exit advice.handlers
- The handlers to apply.protected TypeDescription getType()
Advice.AssignReturned
getType
in class Advice.AssignReturned
protected Collection<Advice.AssignReturned.Handler> getHandlers()
Advice.AssignReturned
getHandlers
in class Advice.AssignReturned
protected StackManipulation toLoadInstruction(Advice.AssignReturned.Handler handler, int offset)
Advice.AssignReturned
toLoadInstruction
in class Advice.AssignReturned
handler
- The handler for which to apply a load instruction.offset
- The offset of the value that is returned by the advice method.Copyright © 2014–2025. All rights reserved.