com.atlassian.confluence.util
Class AopUtils
java.lang.Object
com.atlassian.confluence.util.AopUtils
public abstract class AopUtils
- extends Object
Utilities for aspect oriented programming
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AopUtils
public AopUtils()
adaptInterface
public static Object adaptInterface(Object target,
Class newInterface,
Class oldInterface,
Object delegate)
- Adapt an interface of an object via a delegate
- Parameters:
target
- Object to adaptnewInterface
- The new interface to implementoldInterface
- The old interface to removedelegate
- A delegate object - this object will intercept all calls made on the newInterface of the target object
- Returns:
- The adapted object
createAdvisedProxy
public static Object createAdvisedProxy(Object target,
org.springframework.aop.Advisor advisor,
Class advisedInterface)
- Convenience method for creating an advised proxy
- Parameters:
target
- Object to adviseadvisor
- Advisor to provide advice to method calls for the proxied objectadvisedInterface
- Interface to advise
- Returns:
- Proxied object