@HashCodeAndEqualsPlugin.Enhance protected static class Advice.AssignReturned.DefaultValueSkip extends Object implements StackManipulation
Modifier and Type | Class and Description |
---|---|
protected static class |
Advice.AssignReturned.DefaultValueSkip.Dispatcher
A dispatcher for skipping a default value.
|
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
Modifier | Constructor and Description |
---|---|
protected |
DefaultValueSkip(StackManipulation stackManipulation,
Advice.StackMapFrameHandler.ForPostProcessor stackMapFrameHandler,
int offset,
Advice.AssignReturned.DefaultValueSkip.Dispatcher dispatcher)
Creates a null-check wrapper.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation.Size |
apply(MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.
|
boolean |
isValid()
Determines if this stack manipulation is valid.
|
protected static StackManipulation |
of(StackManipulation stackManipulation,
Advice.StackMapFrameHandler.ForPostProcessor stackMapFrameHandler,
int offset,
TypeDefinition typeDefinition)
Resolves a skipping stack manipulation for the supplied type.
|
protected DefaultValueSkip(StackManipulation stackManipulation, Advice.StackMapFrameHandler.ForPostProcessor stackMapFrameHandler, int offset, Advice.AssignReturned.DefaultValueSkip.Dispatcher dispatcher)
stackManipulation
- The wrapped stack manipulation in case the value is not a default value.stackMapFrameHandler
- The stack map frame handler to use.offset
- The offset of the value of the returned type.dispatcher
- The dispatcher to use.protected static StackManipulation of(StackManipulation stackManipulation, Advice.StackMapFrameHandler.ForPostProcessor stackMapFrameHandler, int offset, TypeDefinition typeDefinition)
stackManipulation
- The stack manipulation to wrap.stackMapFrameHandler
- The stack map frame handler to use.offset
- The offset of the value of the returned type.typeDefinition
- The type that is returned by the advice method.public boolean isValid()
isValid
in interface StackManipulation
false
, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(MethodVisitor methodVisitor, Implementation.Context implementationContext)
apply
in interface StackManipulation
methodVisitor
- The method visitor used to write the method implementation to.implementationContext
- The context of the current implementation.Copyright © 2014–2024. All rights reserved.