I
- The primary interface of the adapter being createdT
- The type of adapter created by this classpublic abstract class AbstractAnnotationHandlerBeanPostProcessor<I,T extends I> extends Object implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.beans.factory.BeanFactoryAware
Constructor and Description |
---|
AbstractAnnotationHandlerBeanPostProcessor() |
Modifier and Type | Method and Description |
---|---|
protected abstract Class<?>[] |
getAdapterInterfaces()
Returns the interface that the adapter implements to connect the annotated method to the actual interface
definition.
|
protected abstract T |
initializeAdapterFor(Object bean,
ParameterResolverFactory parameterResolverFactory,
HandlerDefinition handlerDefinition)
Create an AnnotationEventListenerAdapter instance of the given
bean . |
protected abstract boolean |
isPostProcessingCandidate(Class<?> targetClass)
Indicates whether an object of the given
targetClass should be post processed. |
Object |
postProcessAfterInitialization(Object bean,
String beanName) |
Object |
postProcessBeforeInitialization(Object bean,
String beanName) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setHandlerDefinition(HandlerDefinition handlerDefinition)
Sets the HandlerDefinition to create concrete handlers.
|
void |
setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
Sets the ParameterResolverFactory to create the Parameter Resolvers with that provide the parameter values for
the handler methods.
|
public AbstractAnnotationHandlerBeanPostProcessor()
public Object postProcessBeforeInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessBeforeInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
public Object postProcessAfterInitialization(Object bean, String beanName) throws org.springframework.beans.BeansException
postProcessAfterInitialization
in interface org.springframework.beans.factory.config.BeanPostProcessor
org.springframework.beans.BeansException
protected abstract Class<?>[] getAdapterInterfaces()
protected abstract boolean isPostProcessingCandidate(Class<?> targetClass)
targetClass
should be post processed.targetClass
- The type of beanprotected abstract T initializeAdapterFor(Object bean, ParameterResolverFactory parameterResolverFactory, HandlerDefinition handlerDefinition)
bean
. This adapter will receive all event
handler calls to be handled by this bean.bean
- The bean that the EventListenerAdapter has to adaptparameterResolverFactory
- The parameter resolver factory that provides the parameter resolvers for the
annotated handlershandlerDefinition
- The handler definition used to create concrete handlersbean
public void setParameterResolverFactory(ParameterResolverFactory parameterResolverFactory)
parameterResolverFactory
- The parameter resolver factory to resolve parameter values withpublic void setHandlerDefinition(HandlerDefinition handlerDefinition)
handlerDefinition
- The handler definition used to create concrete handlerspublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException
setBeanFactory
in interface org.springframework.beans.factory.BeanFactoryAware
org.springframework.beans.BeansException
Copyright © 2010–2018. All rights reserved.