public class ProxyProcessorSupport extends ProxyConfig implements Ordered, BeanClassLoaderAware, AopInfrastructureBean
evaluateProxyInterfaces(java.lang.Class<?>, org.springframework.aop.framework.ProxyFactory) algorithm.AbstractAdvisingBeanPostProcessor,
AbstractAutoProxyCreator,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
private boolean |
classLoaderConfigured |
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.
|
private java.lang.ClassLoader |
proxyClassLoader |
exposeProxy, opaqueHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
ProxyProcessorSupport() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
evaluateProxyInterfaces(java.lang.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 java.lang.ClassLoader |
getProxyClassLoader()
Return the configured proxy ClassLoader for this processor.
|
protected boolean |
isConfigurationCallbackInterface(java.lang.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(java.lang.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(java.lang.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 class's implementation
of Ordered, used when applying multiple processors.
|
void |
setProxyClassLoader(java.lang.ClassLoader classLoader)
Set the ClassLoader to generate the proxy class in.
|
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toStringprivate int order
private java.lang.ClassLoader proxyClassLoader
private boolean classLoaderConfigured
public void setOrder(int order)
Default value is Integer.MAX_VALUE, meaning that it's non-ordered.
order - the ordering valuepublic int getOrder()
OrderedHigher 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 OrderedOrdered.HIGHEST_PRECEDENCE,
Ordered.LOWEST_PRECEDENCEpublic void setProxyClassLoader(java.lang.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.
protected java.lang.ClassLoader getProxyClassLoader()
public void setBeanClassLoader(java.lang.ClassLoader classLoader)
BeanClassLoaderAwareclass 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 BeanClassLoaderAwareclassLoader - the owning class loader; may be null in
which case a default ClassLoader must be used, for example
the ClassLoader obtained via
ClassUtils.getDefaultClassLoader()protected void evaluateProxyInterfaces(java.lang.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(java.lang.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(java.lang.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