Package org.spongepowered.asm.mixin.injection.callback

## Class CallbackInfoReturnable<R>

- java.lang.Object
- - org.spongepowered.asm.mixin.injection.callback.CallbackInfo
  - - org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable<R>

- Type Parameters:
    `R` - Return type
  All Implemented Interfaces:
    `Cancellable`

      public class CallbackInfoReturnable<R>
      extends CallbackInfo

  For callbacks with a non-void return type, a CallbackInfoReturnable is passed to the callback instead to allow the callback to interact with the method return value.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, boolean returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, byte returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, char returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, double returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, float returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, int returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, long returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, short returnValue)` |
    `CallbackInfoReturnable​(java.lang.String name, boolean cancellable, R returnValue)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `R` | `getReturnValue()` |
    `byte` | `getReturnValueB()` |
    `char` | `getReturnValueC()` |
    `double` | `getReturnValueD()` |
    `float` | `getReturnValueF()` |
    `int` | `getReturnValueI()` |
    `long` | `getReturnValueJ()` |
    `short` | `getReturnValueS()` |
    `boolean` | `getReturnValueZ()` |
    `void` | `setReturnValue​(R returnValue)` | Sets a return value for this callback and cancels the callback (required in order to return the new value)

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

      `cancel, getCallInfoClassName, getId, isCancellable, isCancelled, toString`

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

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

- - ### Constructor Detail

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        R returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        byte returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        char returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        double returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        float returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        int returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        long returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        short returnValue)

    - #### CallbackInfoReturnable

          public CallbackInfoReturnable​(java.lang.String name,
                                        boolean cancellable,
                                        boolean returnValue)

  - ### Method Detail

    - #### setReturnValue

          public void setReturnValue​(R returnValue)
                              throws CancellationException

      Sets a return value for this callback and cancels the callback (required in order to return the new value)
      Parameters:
        `returnValue` - value to return
      Throws:
        `CancellationException`

    - #### getReturnValue

          public R getReturnValue()

    - #### getReturnValueB

          public byte getReturnValueB()

    - #### getReturnValueC

          public char getReturnValueC()

    - #### getReturnValueD

          public double getReturnValueD()

    - #### getReturnValueF

          public float getReturnValueF()

    - #### getReturnValueI

          public int getReturnValueI()

    - #### getReturnValueJ

          public long getReturnValueJ()

    - #### getReturnValueS

          public short getReturnValueS()

    - #### getReturnValueZ

          public boolean getReturnValueZ()