Class HashCodeMethod.OffsetProvider.ForFixedValue

java.lang.Object
net.bytebuddy.implementation.HashCodeMethod.OffsetProvider.ForFixedValue
All Implemented Interfaces:
HashCodeMethod.OffsetProvider
Enclosing interface:
HashCodeMethod.OffsetProvider

@Enhance public static class HashCodeMethod.OffsetProvider.ForFixedValue extends Object implements HashCodeMethod.OffsetProvider
An offset provider that supplies a fixed value.
  • Field Details

    • value

      private final int value
      The value to load onto the operand stack.
  • Constructor Details

    • ForFixedValue

      protected ForFixedValue(int value)
      Creates a new offset provider for a fixed value.
      Parameters:
      value - The value to load onto the operand stack.
  • Method Details

    • resolve

      public StackManipulation resolve(TypeDescription instrumentedType)
      Resolves this offset provider for a given instrumented type.
      Specified by:
      resolve in interface HashCodeMethod.OffsetProvider
      Parameters:
      instrumentedType - The instrumented type.
      Returns:
      A stack manipulation that loads the initial hash code onto the operand stack.