org.equilibriums.aop.utils.interceptor.delegate
Class DelegateInterceptor
java.lang.Object
org.equilibriums.aop.utils.interceptor.delegate.DelegateInterceptor
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
public class DelegateInterceptor
- extends Object
- implements org.aopalliance.intercept.MethodInterceptor
Selects delegate from specified delegate map with a key fetched from method arguments using specified argument index and property path.
This interceptor uses reflection to lookup delegate key and might introduce performance overhead of about 2 times.
For more on how to use this interceptor see Overview section of this Javadoc.
- Author:
- Tsolak Petrosian
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegateInterceptor
public DelegateInterceptor()
isProceed
public boolean isProceed()
setProceed
public void setProceed(boolean proceed)
getArgumentIndex
public int getArgumentIndex()
setArgumentIndex
public void setArgumentIndex(int argumentIndex)
getPropertyPath
public String getPropertyPath()
setPropertyPath
public void setPropertyPath(String propertyPath)
getDelegateMap
public Map<Object,Object> getDelegateMap()
setDelegateMap
public void setDelegateMap(Map<Object,Object> delegateMap)
invoke
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws Throwable
- Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
Throwable
Copyright © 2011. All Rights Reserved.