类 ProxyProcessorSupport
- java.lang.Object
- org.springframework.aop.framework.ProxyConfig
- org.springframework.aop.framework.ProxyProcessorSupport
- 所有已实现的接口:
Serializable
,AopInfrastructureBean
,Aware
,BeanClassLoaderAware
,Ordered
public class ProxyProcessorSupport extends ProxyConfig implements Ordered, BeanClassLoaderAware, AopInfrastructureBean
Base class with common functionality for proxy processors, in particular ClassLoader management and theevaluateProxyInterfaces(java.lang.Class<?>, org.springframework.aop.framework.ProxyFactory)
algorithm.- 从以下版本开始:
- 4.1
- 作者:
- Juergen Hoeller
- 另请参阅:
AbstractAdvisingBeanPostProcessor
,AbstractAutoProxyCreator
, 序列化表格
字段概要
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 ProxyProcessorSupport()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
evaluateProxyInterfaces(Class<?> beanClass, ProxyFactory proxyFactory)
Check the interfaces on the given bean class and apply them to theProxyFactory
, if appropriate.int
getOrder()
Get the order value of this object.protected ClassLoader
getProxyClassLoader()
Return the configured proxy ClassLoader for this processor.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.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.void
setBeanClassLoader(ClassLoader classLoader)
Callback that supplies the beanclass loader
to a bean instance.void
setOrder(int order)
Set the ordering which will apply to this processor's implementation ofOrdered
, used when applying multiple processors.void
setProxyClassLoader(ClassLoader classLoader)
Set the ClassLoader to generate the proxy class in.从类继承的方法 org.springframework.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString
构造器详细资料
ProxyProcessorSupport
public ProxyProcessorSupport()
方法详细资料
setOrder
public void setOrder(int order)
Set the ordering which will apply to this processor's implementation ofOrdered
, used when applying multiple processors.The default value is
Ordered.LOWEST_PRECEDENCE
, meaning non-ordered.- 参数:
order
- the ordering value
getOrder
public int getOrder()
从接口复制的说明:Ordered
Get the order value of this object.Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet
load-on-startup
values).Same order values will result in arbitrary sort positions for the affected objects.
- 指定者:
getOrder
在接口中Ordered
- 返回:
- the order value
- 另请参阅:
Ordered.HIGHEST_PRECEDENCE
,Ordered.LOWEST_PRECEDENCE
setProxyClassLoader
public void setProxyClassLoader(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
protected ClassLoader getProxyClassLoader()
Return the configured proxy ClassLoader for this processor.
setBeanClassLoader
public void setBeanClassLoader(ClassLoader classLoader)
从接口复制的说明:BeanClassLoaderAware
Callback that supplies the beanclass loader
to a bean instance.Invoked after the population of normal bean properties but before an initialization callback such as
InitializingBean's
InitializingBean.afterPropertiesSet()
method or a custom init-method.- 指定者:
setBeanClassLoader
在接口中BeanClassLoaderAware
- 参数:
classLoader
- the owning class loader; may benull
in which case a defaultClassLoader
must be used, for example theClassLoader
obtained viaClassUtils.getDefaultClassLoader()
evaluateProxyInterfaces
protected void evaluateProxyInterfaces(Class<?> beanClass, ProxyFactory proxyFactory)
Check the interfaces on the given bean class and apply them to theProxyFactory
, if appropriate.Calls
isConfigurationCallbackInterface(java.lang.Class<?>)
andisInternalLanguageInterface(java.lang.Class<?>)
to filter for reasonable proxy interfaces, falling back to a target-class proxy otherwise.- 参数:
beanClass
- the class of the beanproxyFactory
- 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