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
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
ConstructorsConstructorDescriptionCallbackInfoReturnable(String name, boolean cancellable) CallbackInfoReturnable(String name, boolean cancellable, boolean returnValue) CallbackInfoReturnable(String name, boolean cancellable, byte returnValue) CallbackInfoReturnable(String name, boolean cancellable, char returnValue) CallbackInfoReturnable(String name, boolean cancellable, double returnValue) CallbackInfoReturnable(String name, boolean cancellable, float returnValue) CallbackInfoReturnable(String name, boolean cancellable, int returnValue) CallbackInfoReturnable(String name, boolean cancellable, long returnValue) CallbackInfoReturnable(String name, boolean cancellable, short returnValue) CallbackInfoReturnable(String name, boolean cancellable, R returnValue) -
Method Summary
Modifier and TypeMethodDescriptionbytechardoublefloatintlongshortbooleanvoidsetReturnValue(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
-
Constructor Details
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
CallbackInfoReturnable
-
-
Method Details
-
setReturnValue
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
-
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()
-