Class Advice.OffsetMapping.Target.ForStackManipulation

    • Field Detail

      • stackManipulation

        private final StackManipulation stackManipulation
        The represented stack manipulation.
    • Constructor Detail

      • ForStackManipulation

        public ForStackManipulation​(StackManipulation stackManipulation)
        Creates a new target for an offset mapping for a stack manipulation.
        Parameters:
        stackManipulation - The represented stack manipulation.
    • Method Detail

      • of

        public static Advice.OffsetMapping.Target of​(TypeDescription typeDescription)
        Creates a target for an offset mapping for a type constant.
        Parameters:
        typeDescription - The type constant to represent.
        Returns:
        A mapping for a type constant.
      • of

        public static Advice.OffsetMapping.Target of​(java.lang.Object value)
        Creates a target for an offset mapping for a constant value or null.
        Parameters:
        value - The constant value to represent or null.
        Returns:
        An appropriate target for an offset mapping.
      • resolveIncrement

        public StackManipulation resolveIncrement​(int value)
        Resolves an increment instruction.
        Specified by:
        resolveIncrement in interface Advice.OffsetMapping.Target
        Parameters:
        value - The incrementation value.
        Returns:
        A stack manipulation that represents a writing to an advice parameter.