@HashCodeAndEqualsPlugin.Enhance protected static class Advice.AssignReturned.ForScalar extends Advice.AssignReturned
Advice.AssignReturned
that uses the returned value as such.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, type
Modifier | Constructor and Description |
---|---|
protected |
ForScalar(TypeDescription.Generic type,
Advice.AssignReturned.ExceptionHandler.Factory exceptionHandlerFactory,
boolean exit,
boolean skipOnDefaultValue,
Collection<List<Advice.AssignReturned.Handler>> handlers)
Creates a post processor to assign a returned scalar value.
|
Modifier and Type | Method and Description |
---|---|
protected Collection<Advice.AssignReturned.Handler> |
getHandlers()
Returns a collection of all handlers to apply.
|
protected TypeDescription.Generic |
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 ForScalar(TypeDescription.Generic type, Advice.AssignReturned.ExceptionHandler.Factory exceptionHandlerFactory, boolean exit, boolean skipOnDefaultValue, Collection<List<Advice.AssignReturned.Handler>> handlers)
type
- The type of the advice method.exceptionHandlerFactory
- The exception handler factory to use.exit
- true
if the post processor is applied to exit advice.skipOnDefaultValue
- true
if a default value indicates that no assignment should be conducted.handlers
- The handlers to apply.protected TypeDescription.Generic 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–2024. All rights reserved.