类 ProxyProcessorSupport

java.lang.Object
infra.aop.framework.ProxyConfig
infra.aop.framework.ProxyProcessorSupport
所有已实现的接口:
AopInfrastructureBean, infra.beans.factory.Aware, infra.beans.factory.BeanClassLoaderAware, infra.core.Ordered, Serializable
直接已知子类:
AbstractAdvisingBeanPostProcessor, AbstractAutoProxyCreator

public class ProxyProcessorSupport extends ProxyConfig implements infra.core.Ordered, infra.beans.factory.BeanClassLoaderAware, AopInfrastructureBean
Base class with common functionality for proxy processors, in particular ClassLoader management and the evaluateProxyInterfaces(java.lang.Class<?>, infra.aop.framework.ProxyFactory) algorithm.
从以下版本开始:
4.0
作者:
Juergen Hoeller, Harry Yang 2021/11/28 17:10
另请参阅:
  • 字段详细资料

    • serialVersionUID

      private static final long serialVersionUID
      另请参阅:
    • order

      private int order
      This should run after all other processors, so that it can just add an advisor to existing proxies rather than double-proxy.
    • proxyClassLoader

      @Nullable private ClassLoader proxyClassLoader
    • classLoaderConfigured

      private boolean classLoaderConfigured
  • 构造器详细资料

    • ProxyProcessorSupport

      public ProxyProcessorSupport()
  • 方法详细资料

    • setOrder

      public void setOrder(int order)
      Set the ordering which will apply to this processor's implementation of Ordered, used when applying multiple processors.

      The default value is Ordered.LOWEST_PRECEDENCE, meaning non-ordered.

      参数:
      order - the ordering value
    • getOrder

      public int getOrder()
      指定者:
      getOrder 在接口中 infra.core.Ordered
    • setProxyClassLoader

      public void setProxyClassLoader(@Nullable ClassLoader classLoader)
      Set the ClassLoader to generate the proxy class in.

      Default is the bean ClassLoader, i.e. the ClassLoader used by the containing BeanFactory for loading all bean classes.This can be overridden here for specific proxies.

    • getProxyClassLoader

      @Nullable protected ClassLoader getProxyClassLoader()
      Return the configured proxy ClassLoader for this processor.
    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader classLoader)
      指定者:
      setBeanClassLoader 在接口中 infra.beans.factory.BeanClassLoaderAware
    • evaluateProxyInterfaces

      protected void evaluateProxyInterfaces(Class<?> beanClass, ProxyFactory proxyFactory)
      Check the interfaces on the given bean class and apply them to the ProxyFactory, if appropriate.

      Calls isConfigurationCallbackInterface(java.lang.Class<?>) and isInternalLanguageInterface(java.lang.Class<?>) to filter for reasonable proxy interfaces, falling back to a target-class proxy otherwise.

      参数:
      beanClass - the class of the bean
      proxyFactory - the ProxyFactory for the bean
    • isConfigurationCallbackInterface

      protected boolean isConfigurationCallbackInterface(Class<?> ifc)
      Determine whether the given interface is just a container callback and therefore not to be considered as a reasonable proxy interface.

      If no reasonable proxy interface is found for a given bean, it will get proxied with its full target class, assuming that as the user's intention.

      参数:
      ifc - the interface to check
      返回:
      whether the given interface is just a container callback
    • isInternalLanguageInterface

      protected boolean isInternalLanguageInterface(Class<?> ifc)
      Determine whether the given interface is a well-known internal language interface and therefore not to be considered as a reasonable proxy interface.

      If no reasonable proxy interface is found for a given bean, it will get proxied with its full target class, assuming that as the user's intention.

      参数:
      ifc - the interface to check
      返回:
      whether the given interface is an internal language interface