Package 

Class Pine.CallFrame


  • 
    public class Pine.CallFrame
    
                        

    A Holder that holds the method, "this" object, arguments, result or exception of a method call.

    • Method Detail

      • getResult

         Object getResult()

        Get the result that will be returned in this method call.

      • setResult

         void setResult(Object result)

        Set a result that will be returned in this method call.If you call it {@code beforeCall}, the original method call will be prevented, and nexthooks will not be called.

        Parameters:
        result - The return value you want to set.
      • setThrowable

         void setThrowable(Throwable throwable)

        Set the exception that will be thrown in this method call.If you call it {@code beforeCall}, the original method call will be prevented, and nexthooks will not be called.

        Parameters:
        throwable - The exception you want to throw.
      • setResultIfNoException

         void setResultIfNoException(Object result)

        Like setResult but only set the return value if no exception will be thrown.

        Parameters:
        result - The return value you want to set.
      • hasThrowable

         boolean hasThrowable()

        Return whether an exception will be thrown as the result of this method call.

      • resetResult

         void resetResult()

        Reset any previous result or exception, and allows the original method to be executed.

      • invokeOriginalMethod

         Object invokeOriginalMethod()

        Invoke the original implementation of the method with current {@code thisObject} and {@code args}.