Package org.spongepowered.asm.mixin.injection.points

## Class AfterInvoke

- java.lang.Object
- - org.spongepowered.asm.mixin.injection.InjectionPoint
  - - org.spongepowered.asm.mixin.injection.points.BeforeInvoke
    - - org.spongepowered.asm.mixin.injection.points.AfterInvoke

-     public class AfterInvoke
      extends BeforeInvoke

  This injection point searches for INVOKEVIRTUAL, INVOKESTATIC and INVOKESPECIAL opcodes matching its arguments and returns a list of insns after the matching instructions, with special handling for methods invocations which return a value and immediately assign it to a local variable. It accepts the following parameters from `At`:

  target
    A `Target Selector` which identifies the target method
  ordinal
    The ordinal position of the method invocation to match. For example if the method is invoked 3 times and you want to match the 3rd then you can specify an ordinal of 2 (ordinals are zero-indexed). The default value is -1 which supresses ordinal matching
  named argument: fuzz
    By default, the injection point inspects only the instruction immediately following the matched invocation and will match store instructions. Specifying a higher `fuzz` increases the search range, skipping instructions as necessary to find a matching store opcode.
  named argument: skip
    When `fuzz` is specified, a default list of skippable opcodes is used. The list of skippable opcodes can be overridden by specifying a list of opcodes (numeric values or constant names from `Opcodes` can be used). This can be used to restrict the `fuzz` behaviour to consume only expected opcodes (eg. `CHECKCAST`). Note that store opcodes cannot be skipped and specifying them has no effect.

  Example:

  >        @At(value = "INVOKE_ASSIGN", target="func_1234_a(III)J")

  Note that unlike other standard injection points, this class matches the insn after the invocation, and after any local variable assignment. Use the `shift` specifier to adjust the matched opcode as necessary.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.spongepowered.asm.mixin.injection.points.BeforeInvoke

      `BeforeInvoke.SearchType`

    - ### Nested classes/interfaces inherited from class org.spongepowered.asm.mixin.injection.InjectionPoint

      `InjectionPoint.AtCode, InjectionPoint.Flags, InjectionPoint.RestrictTargetLevel, InjectionPoint.Specifier`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static int[]` | `DEFAULT_SKIP` | Default opcodes which are eligible to be skipped (see named argument `skip` above) if named argument `fuzz` is increased beyond the default value of `1`.

    - ### Fields inherited from class org.spongepowered.asm.mixin.injection.points.BeforeInvoke

      `allowPermissive, className, context, logger, mixin, ordinal, target`

    - ### Fields inherited from class org.spongepowered.asm.mixin.injection.InjectionPoint

      `DEFAULT_ALLOWED_SHIFT_BY, MAX_ALLOWED_SHIFT_BY`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AfterInvoke​(InjectionPointData data)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected boolean` | `addInsn​(org.objectweb.asm.tree.InsnList insns, java.util.Collection<org.objectweb.asm.tree.AbstractInsnNode> nodes, org.objectweb.asm.tree.AbstractInsnNode insn)` |

    - ### Methods inherited from class org.spongepowered.asm.mixin.injection.points.BeforeInvoke

      `find, find, inspectInsn, log, matchesInsn, matchesOrdinal, setLogging`

    - ### Methods inherited from class org.spongepowered.asm.mixin.injection.InjectionPoint

      `addMessage, after, and, before, checkPriority, getAtCode, getId, getSlice, getSpecifier, getTargetRestriction, nextNode, or, parse, parse, parse, parse, parse, parse, parse, parse, register, register, setTargetRestriction, shift, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_SKIP

          public static final int[] DEFAULT_SKIP

      Default opcodes which are eligible to be skipped (see named argument `skip` above) if named argument `fuzz` is increased beyond the default value of `1`.

      Skipped opcodes: `DUP`, `IADD`, `LADD`, `FADD`, `DADD`, `ISUB`, `LSUB`, `FSUB`, `DSUB`, `IMUL`, `LMUL`, `FMUL`, `DMUL`, `IDIV`, `LDIV`, `FDIV`, `DDIV`, `IREM`, `LREM`, `FREM`, `DREM`, `INEG`, `LNEG`, `FNEG`, `DNEG`, `ISHL`, `LSHL`, `ISHR`, `LSHR`, `IUSHR`, `LUSHR`, `IAND`, `LAND`, `IOR`, `LOR`, `IXOR`, `LXOR`, `IINC`, `I2L`, `I2F`, `I2D`, `L2I`, `L2F`, `L2D`, `F2I`, `F2L`, `F2D`, `D2I`, `D2L`, `D2F`, `I2B`, `I2C`, `I2S`, `CHECKCAST`, `INSTANCEOF`

  - ### Constructor Detail

    - #### AfterInvoke

          public AfterInvoke​(InjectionPointData data)

  - ### Method Detail

    - #### addInsn

          protected boolean addInsn​(org.objectweb.asm.tree.InsnList insns,
                                    java.util.Collection<org.objectweb.asm.tree.AbstractInsnNode> nodes,
                                    org.objectweb.asm.tree.AbstractInsnNode insn)

      Overrides:
        `addInsn` in class `BeforeInvoke`