com.atlassian.confluence.util
Class AopUtils

java.lang.Object
  extended by com.atlassian.confluence.util.AopUtils

public abstract class AopUtils
extends java.lang.Object

Utilities for aspect oriented programming


Constructor Summary
AopUtils()
           
 
Method Summary
static java.lang.Object adaptInterface(java.lang.Object target, java.lang.Class newInterface, java.lang.Class oldInterface, java.lang.Object delegate)
          Adapt an interface of an object via a delegate
static java.lang.Object createAdvisedDynamicProxy(java.lang.Object target, org.springframework.aop.Advisor advisor)
          Convenience method for creating an advised proxy, the proxy will implement all interfaces present on the target
static
<T> T
createAdvisedProxy(java.lang.Object target, org.springframework.aop.Advisor advisor, java.lang.Class<T> advisedInterface)
          Convenience method for creating an advised proxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AopUtils

public AopUtils()
Method Detail

adaptInterface

public static java.lang.Object adaptInterface(java.lang.Object target,
                                              java.lang.Class newInterface,
                                              java.lang.Class oldInterface,
                                              java.lang.Object delegate)
Adapt an interface of an object via a delegate

Parameters:
target - Object to adapt
newInterface - The new interface to implement
oldInterface - The old interface to remove
delegate - A delegate object - this object will intercept all calls made on the newInterface of the target object
Returns:
The adapted object

createAdvisedProxy

public static <T> T createAdvisedProxy(java.lang.Object target,
                                       org.springframework.aop.Advisor advisor,
                                       java.lang.Class<T> advisedInterface)
Convenience method for creating an advised proxy

Parameters:
target - Object to advise
advisor - Advisor to provide advice to method calls for the proxied object
advisedInterface - Interface to advise
Returns:
Proxied object

createAdvisedDynamicProxy

public static java.lang.Object createAdvisedDynamicProxy(java.lang.Object target,
                                                         org.springframework.aop.Advisor advisor)
Convenience method for creating an advised proxy, the proxy will implement all interfaces present on the target

Parameters:
target - object to advise, must implement at least one interface
advisor - Advisor to provide advice to method calls for the proxied object
Returns:
proxied object


Copyright © 2003-2014 Atlassian. All Rights Reserved.