Package org.spongepowered.asm.mixin.injection.code

## Class Injector.InjectorData

- java.lang.Object
- - org.spongepowered.asm.mixin.injection.code.Injector.InjectorData

- Enclosing class:
    Injector

      public static class Injector.InjectorData
      extends java.lang.Object

  Redirection data bundle base. No this isn't meant to be pretty, it's a way of passing a bunch of state around the injector without having dumb method signatures.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `boolean` | `allowCoerceArgs` | When passing through `Injector.validateParams(org.spongepowered.asm.mixin.injection.code.Injector.InjectorData, org.objectweb.asm.Type, org.objectweb.asm.Type...)` this switch determines whether coercion is supported for both the primary handler args and captured target args, or for target args only.
    `int` | `captureTargetArgs` | Number of arguments to capture from the target, determined by the number of extra args on the handler method
    `boolean` | `coerceReturnType` | True if the method itself is decorated with `Coerce` and the return type is coerced.
    `java.lang.String` | `description` | Mutable description.
    `Target` | `target` | Redirect target

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InjectorData​(Target target)` |
    `InjectorData​(Target target, java.lang.String description)` |
    `InjectorData​(Target target, java.lang.String description, boolean allowCoerceArgs)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `toString()` |

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

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

- - ### Field Detail

    - #### target

          public final Target target

      Redirect target

    - #### description

          public java.lang.String description

      Mutable description. The bundle is be passed to different types of handler and the handler decorates the bundle with a description of the type of injection, purely for use in error messages.

    - #### allowCoerceArgs

          public boolean allowCoerceArgs

      When passing through `Injector.validateParams(org.spongepowered.asm.mixin.injection.code.Injector.InjectorData, org.objectweb.asm.Type, org.objectweb.asm.Type...)` this switch determines whether coercion is supported for both the primary handler args and captured target args, or for target args only.

    - #### captureTargetArgs

          public int captureTargetArgs

      Number of arguments to capture from the target, determined by the number of extra args on the handler method

    - #### coerceReturnType

          public boolean coerceReturnType

      True if the method itself is decorated with `Coerce` and the return type is coerced. Instructs the injector to add a CHECKCAST following the handler.

  - ### Constructor Detail

    - #### InjectorData

          public InjectorData​(Target target)

    - #### InjectorData

          public InjectorData​(Target target,
                              java.lang.String description)

    - #### InjectorData

          public InjectorData​(Target target,
                              java.lang.String description,
                              boolean allowCoerceArgs)

  - ### Method Detail

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`