Class AopUtils


  • public class AopUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      AopUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object unwrapProxy​(java.lang.Object bean, java.lang.Boolean recursive)
      This is a utility method for getting raw objects that may have been proxied.
      • 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

      • unwrapProxy

        public static java.lang.Object unwrapProxy​(java.lang.Object bean,
                                                   java.lang.Boolean recursive)
        This is a utility method for getting raw objects that may have been proxied. It is intended to be used in cases where raw implementations are needed rather than working with interfaces which they implement.
        Parameters:
        bean - the potential proxy.
        recursive - whether to procceeed recursively through nested proxies.
        Returns:
        the unwrapped bean or null if target bean is null. If recursive parameter is true then returns the most inner unwrapped bean, otherwise the nearest target bean is returned. Based on this Spring forum topic.
        Since:
        3.0.0
        See Also:
        Advised