public abstract class AnnotationListenerMethodProcessor<A extends Annotation> extends Object implements org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>
| 限定符和类型 | 字段和说明 |
|---|---|
protected org.apache.commons.logging.Log |
logger |
| 构造器和说明 |
|---|
AnnotationListenerMethodProcessor() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
isCandidateMethod(Object bean,
Class<?> beanClass,
A annotation,
Method method,
org.springframework.context.ApplicationContext applicationContext)
Subclass could override this method to determine current method is candidate or not
|
void |
onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event) |
protected abstract void |
processListenerMethod(String beanName,
Object bean,
Class<?> beanClass,
A annotation,
Method method,
org.springframework.context.ApplicationContext applicationContext)
Process Listener Method when
isCandidateMethod(Object, Class, Annotation, Method, ApplicationContext)
returns true |
public final void onApplicationEvent(org.springframework.context.event.ContextRefreshedEvent event)
onApplicationEvent 在接口中 org.springframework.context.ApplicationListener<org.springframework.context.event.ContextRefreshedEvent>protected abstract void processListenerMethod(String beanName, Object bean, Class<?> beanClass, A annotation, Method method, org.springframework.context.ApplicationContext applicationContext)
isCandidateMethod(Object, Class, Annotation, Method, ApplicationContext)
returns truebeanName - Bean namebean - Bean objectbeanClass - Bean Classannotation - Annotation objectmethod - MethodapplicationContext - ApplicationContextprotected boolean isCandidateMethod(Object bean, Class<?> beanClass, A annotation, Method method, org.springframework.context.ApplicationContext applicationContext)
bean - Bean objectbeanClass - Bean Classannotation - Annotation objectmethod - MethodapplicationContext - ApplicationContexttrue as defaultCopyright © 2021. All rights reserved.