Package org.springframework.aop.framework

# Class ProxyProcessorSupport

java.lang.Object
org.springframework.aop.framework.ProxyConfig
org.springframework.aop.framework.ProxyProcessorSupport

All Implemented Interfaces:
  `Serializable`, `AopInfrastructureBean`, `org.springframework.beans.factory.Aware`, `org.springframework.beans.factory.BeanClassLoaderAware`, `org.springframework.core.Ordered`

Direct Known Subclasses:
  `AbstractAdvisingBeanPostProcessor`, `AbstractAutoProxyCreator`

public class ProxyProcessorSupport extends ProxyConfig implements org.springframework.core.Ordered, org.springframework.beans.factory.BeanClassLoaderAware, AopInfrastructureBean
Base class with common functionality for proxy processors, in particular ClassLoader management and the `evaluateProxyInterfaces(java.lang.Class<?>, org.springframework.aop.framework.ProxyFactory)` algorithm.

Since:
  4.1
Author:
  Juergen Hoeller
See Also:
  - `AbstractAdvisingBeanPostProcessor`
  - `AbstractAutoProxyCreator`
  - Serialized Form

## Field Summary

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`ProxyProcessorSupport()`

## Method Summary

Modifier and Type
Method
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()`
`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)`
`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.

### Methods inherited from class org.springframework.aop.framework.ProxyConfig

`copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ProxyProcessorSupport

public ProxyProcessorSupport()

## Method Details

### 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.

Parameters:
  `order` - the ordering value

### getOrder

public int getOrder()

Specified by:
  `getOrder` in interface `org.springframework.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)

Specified by:
  `setBeanClassLoader` in interface `org.springframework.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.

Parameters:
  `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.

Parameters:
  `ifc` - the interface to check
Returns:
  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.

Parameters:
  `ifc` - the interface to check
Returns:
  whether the given interface is an internal language interface