Class 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 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()