Package org.spongepowered.asm.mixin.injection.invoke

## Class ModifyArgInjector

- java.lang.Object
- - org.spongepowered.asm.mixin.injection.code.Injector
  - - org.spongepowered.asm.mixin.injection.invoke.InvokeInjector
    - - org.spongepowered.asm.mixin.injection.invoke.ModifyArgInjector

-     public class ModifyArgInjector
      extends InvokeInjector

  A bytecode injector which allows a single argument of a chosen method call to be altered. For details see javadoc for `@ModifyArg`.

- - ### Nested Class Summary

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

      `Injector.InjectorData, Injector.TargetNode`

  - ### Field Summary

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

      `annotationType, classNode, info, isInterface, isStatic, logger, methodArgs, methodNode, returnType`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ModifyArgInjector​(InjectionInfo info, int index)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `checkTarget​(Target target)` | Sanity checks on target
    `protected int` | `findArgIndex​(Target target, org.objectweb.asm.Type[] args)` |
    `protected void` | `inject​(Target target, InjectionNodes.InjectionNode node)` |
    `protected void` | `injectAtInvoke​(Target target, InjectionNodes.InjectionNode node)` | Do the injection
    `protected void` | `sanityCheck​(Target target, java.util.List<InjectionPoint> injectionPoints)` |

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

      `addTargetNode, addTargetNode, canCoerce, canCoerce, canCoerce, checkCoerce, checkTargetForNode, checkTargetModifiers, find, findTargetNodes, inject, invokeHandler, invokeHandler, invokeHandlerWithArgs, invokeHandlerWithArgs, postInject, preInject, preInject, pushArgs, pushArgs, storeArgs, storeArgs, storeArgs, storeArgs, throwException, toString, validateParams`

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

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

- - ### Constructor Detail

    - #### ModifyArgInjector

          public ModifyArgInjector​(InjectionInfo info,
                                   int index)

      Parameters:
        `info` - Injection info
        `index` - target arg index

  - ### Method Detail

    - #### sanityCheck

          protected void sanityCheck​(Target target,
                                     java.util.List<InjectionPoint> injectionPoints)

      Overrides:
        `sanityCheck` in class `InvokeInjector`

    - #### checkTarget

          protected void checkTarget​(Target target)

      Description copied from class: `InvokeInjector`
      Sanity checks on target
      Overrides:
        `checkTarget` in class `InvokeInjector`
      Parameters:
        `target` - target

    - #### inject

          protected void inject​(Target target,
                                InjectionNodes.InjectionNode node)

      Overrides:
        `inject` in class `InvokeInjector`

    - #### injectAtInvoke

          protected void injectAtInvoke​(Target target,
                                        InjectionNodes.InjectionNode node)

      Do the injection
      Specified by:
        `injectAtInvoke` in class `InvokeInjector`
      Parameters:
        `target` - Target to inject into
        `node` - Discovered instruction node

    - #### findArgIndex

          protected int findArgIndex​(Target target,
                                     org.objectweb.asm.Type[] args)