Example usage for org.springframework.aop.aspectj AspectJExpressionPointcut matches

List of usage examples for org.springframework.aop.aspectj AspectJExpressionPointcut matches

Introduction

In this page you can find the example usage for org.springframework.aop.aspectj AspectJExpressionPointcut matches.

Prototype

@Override
    public boolean matches(Method method, Class<?> targetClass, Object... args) 

Source Link

Usage

From source file:gov.nih.nci.cabig.ctms.acegi.csm.authorization.JoinPointPrivilegeAndObjectIdGenerator.java

@Override
protected String[] getObjectPrivilege(Object object) {
    String[] objectPrivilege = null;
    if (object != null) {
        assertSupports(object);//from  w  w w .  ja v a2 s.  co m
        JoinPoint joinPoint = (JoinPoint) object;
        MethodSignature sig = (MethodSignature) joinPoint.getSignature();
        Class klass = sig.getDeclaringType();
        Method method = sig.getMethod();
        Object[] params = joinPoint.getArgs();
        for (AspectJExpressionPointcut pointcut : this.internalObjectPrivilegeMap.keySet()) {
            if (pointcut.matches(method, klass, params)) {
                objectPrivilege = this.internalObjectPrivilegeMap.get(pointcut);
                break;
            }
        }
    }
    return objectPrivilege;
}