Example usage for org.springframework.aop ProxyMethodInvocation setUserAttribute

List of usage examples for org.springframework.aop ProxyMethodInvocation setUserAttribute

Introduction

In this page you can find the example usage for org.springframework.aop ProxyMethodInvocation setUserAttribute.

Prototype

void setUserAttribute(String key, @Nullable Object value);

Source Link

Document

Add the specified user attribute with the given value to this invocation.

Usage

From source file:org.springframework.aop.aspectj.AspectJExpressionPointcut.java

private void bindParameters(ProxyMethodInvocation invocation, JoinPointMatch jpm) {
    // Note: Can't use JoinPointMatch.getClass().getName() as the key, since
    // Spring AOP does all the matching at a join point, and then all the invocations
    // under this scenario, if we just use JoinPointMatch as the key, then
    // 'last man wins' which is not what we want at all.
    // Using the expression is guaranteed to be safe, since 2 identical expressions
    // are guaranteed to bind in exactly the same way.
    invocation.setUserAttribute(resolveExpression(), jpm);
}