public class ProxyProcessorSupport extends ProxyConfig implements Ordered, BeanClassLoaderAware, AopInfrastructureBean
evaluateProxyInterfaces(java.lang.Class<?>, org.springframework.aop.framework.ProxyFactory)
algorithm.AbstractAdvisingBeanPostProcessor
,
AbstractAutoProxyCreator
,
Serialized FormHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ProxyProcessorSupport() |
Modifier and Type | Method and Description |
---|---|
protected void |
evaluateProxyInterfaces(Class<?> beanClass,
ProxyFactory proxyFactory)
Check the interfaces on the given bean class and apply them to the
ProxyFactory ,
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 bean
class loader to
a bean instance. |
void |
setOrder(int order)
Set the ordering which will apply to this processor's implementation
of
Ordered , used when applying multiple processors. |
void |
setProxyClassLoader(ClassLoader classLoader)
Set the ClassLoader to generate the proxy class in.
|
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString
public void setOrder(int order)
Ordered
, used when applying multiple processors.
The default value is Ordered.LOWEST_PRECEDENCE
, meaning non-ordered.
order
- the ordering valuepublic int getOrder()
Ordered
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
in interface Ordered
Ordered.HIGHEST_PRECEDENCE
,
Ordered.LOWEST_PRECEDENCE
public void setProxyClassLoader(@Nullable ClassLoader classLoader)
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.
@Nullable protected ClassLoader getProxyClassLoader()
public void setBeanClassLoader(ClassLoader classLoader)
BeanClassLoaderAware
class 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
in interface BeanClassLoaderAware
classLoader
- the owning class loaderprotected void evaluateProxyInterfaces(Class<?> beanClass, ProxyFactory proxyFactory)
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 beanproxyFactory
- the ProxyFactory for the beanprotected boolean isConfigurationCallbackInterface(Class<?> ifc)
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 checkprotected boolean isInternalLanguageInterface(Class<?> ifc)
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