Package net.bytebuddy.implementation
Class EqualsMethod.NullValueGuard.UsingJump
- java.lang.Object
-
- net.bytebuddy.implementation.EqualsMethod.NullValueGuard.UsingJump
-
- All Implemented Interfaces:
EqualsMethod.NullValueGuard
- Enclosing interface:
- EqualsMethod.NullValueGuard
public static class EqualsMethod.NullValueGuard.UsingJump extends java.lang.Object implements EqualsMethod.NullValueGuard
A null value guard that expects a reference type and that skips the comparison if both values arenull
but returns if the invoked instance's field value isnull
but not the compared instance's value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
EqualsMethod.NullValueGuard.UsingJump.AfterInstruction
The stack manipulation to apply after the equality computation.protected static class
EqualsMethod.NullValueGuard.UsingJump.BeforeInstruction
The stack manipulation to apply before the equality computation.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.EqualsMethod.NullValueGuard
EqualsMethod.NullValueGuard.NoOp, EqualsMethod.NullValueGuard.UsingJump
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
UsingJump(MethodDescription instrumentedMethod)
Creates a new null value guard using a jump instruction fornull
values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
after()
Returns a stack manipulation to apply after computing equality.StackManipulation
before()
Returns a stack manipulation to apply before computing equality.int
getRequiredVariablePadding()
Returns the required padding for the local variable array to apply this guard.
-
-
-
Constructor Detail
-
UsingJump
protected UsingJump(MethodDescription instrumentedMethod)
Creates a new null value guard using a jump instruction fornull
values.- Parameters:
instrumentedMethod
- The instrumented method.
-
-
Method Detail
-
before
public StackManipulation before()
Description copied from interface:EqualsMethod.NullValueGuard
Returns a stack manipulation to apply before computing equality.- Specified by:
before
in interfaceEqualsMethod.NullValueGuard
- Returns:
- A stack manipulation to apply before computing equality.
-
after
public StackManipulation after()
Description copied from interface:EqualsMethod.NullValueGuard
Returns a stack manipulation to apply after computing equality.- Specified by:
after
in interfaceEqualsMethod.NullValueGuard
- Returns:
- A stack manipulation to apply after computing equality.
-
getRequiredVariablePadding
public int getRequiredVariablePadding()
Description copied from interface:EqualsMethod.NullValueGuard
Returns the required padding for the local variable array to apply this guard.- Specified by:
getRequiredVariablePadding
in interfaceEqualsMethod.NullValueGuard
- Returns:
- The required padding for the local variable array to apply this guard.
-
-