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.
  • Field Details

    • 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 Details

    • UsingJump

      protected UsingJump(MethodDescription instrumentedMethod)
      Creates a new null value guard using a jump instruction for null values.
      Parameters:
      instrumentedMethod - The instrumented method.
  • Method Details

    • before

      public StackManipulation before()
      Returns a stack manipulation to apply before computing a hash value.
      Specified by:
      before in interface HashCodeMethod.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 interface HashCodeMethod.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 interface HashCodeMethod.NullValueGuard
      Returns:
      The required padding for the local variable array to apply this guard.