Class Advice.OffsetMapping.Target.ForVariable.ReadOnly

java.lang.Object
net.bytebuddy.asm.Advice.OffsetMapping.Target.ForVariable
net.bytebuddy.asm.Advice.OffsetMapping.Target.ForVariable.ReadOnly
All Implemented Interfaces:
Advice.OffsetMapping.Target
Enclosing class:
Advice.OffsetMapping.Target.ForVariable

public static class Advice.OffsetMapping.Target.ForVariable.ReadOnly extends Advice.OffsetMapping.Target.ForVariable
A target for a read-only mapping of a local variable.
  • Constructor Details

    • ReadOnly

      public ReadOnly(TypeDefinition typeDefinition, int offset)
      Creates a read-only mapping for a local variable.
      Parameters:
      typeDefinition - The represented type.
      offset - The value's offset.
    • ReadOnly

      public ReadOnly(TypeDefinition typeDefinition, int offset, StackManipulation readAssignment)
      Creates a read-only mapping for a local variable.
      Parameters:
      typeDefinition - The represented type.
      offset - The value's offset.
      readAssignment - An assignment to execute upon reading a value.
  • Method Details

    • resolveWrite

      public StackManipulation resolveWrite()
      Resolves a write instruction.
      Returns:
      A stack manipulation that represents a writing to an advice parameter.
    • resolveIncrement

      public StackManipulation resolveIncrement(int value)
      Resolves an increment instruction.
      Parameters:
      value - The incrementation value.
      Returns:
      A stack manipulation that represents a writing to an advice parameter.