Package net.bytebuddy.implementation
Class HashCodeMethod.NullValueGuard.UsingJump
- java.lang.Object
-
- net.bytebuddy.implementation.HashCodeMethod.NullValueGuard.UsingJump
-
- All Implemented Interfaces:
HashCodeMethod.NullValueGuard
- Enclosing interface:
- HashCodeMethod.NullValueGuard
@Enhance public static class HashCodeMethod.NullValueGuard.UsingJump extends java.lang.Object implements HashCodeMethod.NullValueGuard
A null value guard that expects a reference type and that uses a jump if a field value isnull
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
HashCodeMethod.NullValueGuard.UsingJump.AfterInstruction
The stack manipulation to apply after the hash value computation.protected class
HashCodeMethod.NullValueGuard.UsingJump.BeforeInstruction
The stack manipulation to apply before the hash value computation.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.HashCodeMethod.NullValueGuard
HashCodeMethod.NullValueGuard.NoOp, HashCodeMethod.NullValueGuard.UsingJump
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.Object[]
EMPTY
An empty array.private MethodDescription
instrumentedMethod
The instrumented method.private static java.lang.Object[]
INTEGER
An array that only contains an integer stack map frame.private org.objectweb.asm.Label
label
A label to indicate the target of a jump.
-
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 a hash value.StackManipulation
before()
Returns a stack manipulation to apply before computing a hash value.int
getRequiredVariablePadding()
Returns the required padding for the local variable array to apply this guard.
-
-
-
Field Detail
-
EMPTY
private static final java.lang.Object[] EMPTY
An empty array.
-
INTEGER
private static final java.lang.Object[] INTEGER
An array that only contains an integer stack map frame.
-
instrumentedMethod
private final MethodDescription instrumentedMethod
The instrumented method.
-
label
private final org.objectweb.asm.Label label
A label to indicate the target of a jump.
-
-
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()
Returns a stack manipulation to apply before computing a hash value.- Specified by:
before
in interfaceHashCodeMethod.NullValueGuard
- Returns:
- A stack manipulation to apply before computing a hash value.
-
after
public StackManipulation after()
Returns a stack manipulation to apply after computing a hash value.- Specified by:
after
in interfaceHashCodeMethod.NullValueGuard
- Returns:
- A stack manipulation to apply after computing a hash value.
-
getRequiredVariablePadding
public int getRequiredVariablePadding()
Returns the required padding for the local variable array to apply this guard.- Specified by:
getRequiredVariablePadding
in interfaceHashCodeMethod.NullValueGuard
- Returns:
- The required padding for the local variable array to apply this guard.
-
-