Interface Interceptor


public interface Interceptor
An interceptor can be used to decorate functionality into an expression or to hook into external functionality, such as to log an event or fire some other event.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    doAfter(Object exitStackValue, ASTNode node, VariableResolverFactory factory)
    This method is called after the wrapped statement has completed.
    int
    This method is executed before the wrapped statement.
  • Field Details

  • Method Details

    • doBefore

      int doBefore(ASTNode node, VariableResolverFactory factory)
      This method is executed before the wrapped statement.
      Parameters:
      node - The ASTNode wrapped by the interceptor
      factory - The variable factory
      Returns:
      The response code. Should return 0.
    • doAfter

      int doAfter(Object exitStackValue, ASTNode node, VariableResolverFactory factory)
      This method is called after the wrapped statement has completed. A copy of the top-value of the execution stack is also availablehere.
      Parameters:
      exitStackValue - The value on the top of the stack after executing the statement.
      node - The ASTNode wrapped by the interceptor
      factory - The variable factory
      Returns:
      The response code. Should return 0.