org.mvel2.integration
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.
- Author:
- Christopher Brock
NORMAL_FLOW
static final int NORMAL_FLOW
- See Also:
- Constant Field Values
SKIP
static final int SKIP
- See Also:
- Constant Field Values
END
static final int END
- See Also:
- Constant Field Values
doBefore
int doBefore(ASTNode node,
VariableResolverFactory factory)
- This method is executed before the wrapped statement.
- Parameters:
node
- The ASTNode wrapped by the interceptorfactory
- The variable factory
- Returns:
- The response code. Should return 0.
doAfter
int doAfter(java.lang.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 interceptorfactory
- The variable factory
- Returns:
- The response code. Should return 0.
Copyright © 2011. All Rights Reserved.