Package net.bytebuddy.implementation
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.HashCodeMethod.OffsetProvider
HashCodeMethod.OffsetProvider.ForDynamicTypeHash, HashCodeMethod.OffsetProvider.ForFixedValue, HashCodeMethod.OffsetProvider.ForStaticTypeHash, HashCodeMethod.OffsetProvider.ForSuperMethodCall
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The value to load onto the operand stack. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForFixedValue
(int value) Creates a new offset provider for a fixed value. -
Method Summary
Modifier and TypeMethodDescriptionresolve
(TypeDescription instrumentedType) Resolves this offset provider for a given instrumented type.
-
Field Details
-
value
private final int valueThe 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
Resolves this offset provider for a given instrumented type.- Specified by:
resolve
in interfaceHashCodeMethod.OffsetProvider
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A stack manipulation that loads the initial hash code onto the operand stack.
-