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 Object
implements HashCodeMethod.NullValueGuard
A null value guard that expects a reference type and that uses a jump if a field value is
null.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classThe stack manipulation to apply after the hash value computation.protected classThe stack manipulation to apply before the hash value computation.Nested classes/interfaces inherited from interface HashCodeMethod.NullValueGuard
HashCodeMethod.NullValueGuard.NoOp, HashCodeMethod.NullValueGuard.UsingJump -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescriptionThe instrumented method.private final org.objectweb.asm.LabelA label to indicate the target of a jump. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUsingJump(MethodDescription instrumentedMethod) Creates a new null value guard using a jump instruction fornullvalues. -
Method Summary
-
Field Details
-
instrumentedMethod
The instrumented method. -
label
private final org.objectweb.asm.Label labelA label to indicate the target of a jump.
-
-
Constructor Details
-
UsingJump
Creates a new null value guard using a jump instruction fornullvalues.- Parameters:
instrumentedMethod- The instrumented method.
-
-
Method Details
-
before
Returns a stack manipulation to apply before computing a hash value.- Specified by:
beforein interfaceHashCodeMethod.NullValueGuard- Returns:
- A stack manipulation to apply before computing a hash value.
-
after
Returns a stack manipulation to apply after computing a hash value.- Specified by:
afterin 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:
getRequiredVariablePaddingin interfaceHashCodeMethod.NullValueGuard- Returns:
- The required padding for the local variable array to apply this guard.
-