Class AutoProxyUtils

java.lang.Object
org.springframework.aop.framework.autoproxy.AutoProxyUtils

public abstract class AutoProxyUtils extends Object
Utilities for auto-proxy aware components. Mainly for internal use within the framework.
Since:
2.0.3
Author:
Juergen Hoeller
See Also:
  • Field Details

  • Constructor Details

    • AutoProxyUtils

      public AutoProxyUtils()
  • Method Details

    • shouldProxyTargetClass

      public static boolean shouldProxyTargetClass(ConfigurableListableBeanFactory beanFactory, @Nullable String beanName)
      Determine whether the given bean should be proxied with its target class rather than its interfaces. Checks the "preserveTargetClass" attribute of the corresponding bean definition.
      Parameters:
      beanFactory - the containing ConfigurableListableBeanFactory
      beanName - the name of the bean
      Returns:
      whether the given bean should be proxied with its target class
    • determineTargetClass

      @Nullable public static Class<?> determineTargetClass(ConfigurableListableBeanFactory beanFactory, @Nullable String beanName)
      Determine the original target class for the specified bean, if possible, otherwise falling back to a regular getType lookup.
      Parameters:
      beanFactory - the containing ConfigurableListableBeanFactory
      beanName - the name of the bean
      Returns:
      the original target class as stored in the bean definition, if any
      Since:
      4.2.3
      See Also: