Class AopUtils

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

public abstract class AopUtils extends Object
Utilities for aspect oriented programming
  • Constructor Details

    • AopUtils

      public AopUtils()
  • Method Details

    • 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 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(Object target, org.springframework.aop.Advisor advisor, 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
    • createAdvisedProxy

      public static <T> T createAdvisedProxy(Object target, Class<T> advisedInterface, org.springframework.aop.Advisor... advisors)
      Convenience method for creating an advised proxy
      Parameters:
      target - Object to advise
      advisedInterface - Interface to advise
      advisors - Advisor list to provide advice to method calls for the proxied object
      Returns:
      Proxied object
      Since:
      5.8
    • createAdvisedProxy

      public static <T> T createAdvisedProxy(Object target, Class<T> advisedInterface, List<org.springframework.aop.Advisor> advisors)
      Convenience method for creating an advised proxy
      Parameters:
      target - Object to advise
      advisedInterface - Interface to advise
      advisors - Advisor list to provide advice to method calls for the proxied object
      Returns:
      Proxied object
      Since:
      5.8
    • createAdvisedDynamicProxy

      public static Object createAdvisedDynamicProxy(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