Class StepInterceptorImpl

java.lang.Object
com.tngtech.jgiven.impl.intercept.StepInterceptorImpl
All Implemented Interfaces:
StepInterceptor

public class StepInterceptorImpl extends Object implements StepInterceptor
  • Field Details

    • stageStack

      protected final Stack<Object> stageStack
      Contains the stack of call receivers. This is used to update the state of a parent stage after a call to a child stage has returned
  • Constructor Details

  • Method Details

    • intercept

      public final Object intercept(Object receiver, Method method, Object[] parameters, StepInterceptor.Invoker invoker) throws Throwable
      Specified by:
      intercept in interface StepInterceptor
      Throws:
      Throwable
    • handleThrowable

      protected Object handleThrowable(Object receiver, Method method, Throwable t, long durationInNanos, boolean handleMethod) throws Throwable
      Throws:
      Throwable
    • returnReceiverOrNull

      protected Object returnReceiverOrNull(Object receiver, Method method)
    • getInvocationMode

      protected InvocationMode getInvocationMode(Object receiver, Method method)
    • enableMethodInterception

      public void enableMethodInterception(boolean b)
    • disableMethodExecution

      public void disableMethodExecution()
    • enableMethodExecution

      public boolean enableMethodExecution(boolean b)
    • setSuppressExceptions

      public void setSuppressExceptions(boolean b)
    • setDefaultInvocationMode

      public void setDefaultInvocationMode(InvocationMode defaultInvocationMode)
    • setScenarioListener

      public void setScenarioListener(ScenarioListener scenarioListener)