public class ContainerMethodAnnotationProcessor extends AbstractContainerMethodSupport
An ContainerMethod annotation processor.
Scan methods annotated directly by ContainerMethod
in the class or methods bound by annotations on class,
and adapt it to Container instance according to given MethodContainerFactory.
ContainerMethod,
MethodContainerFactory| 限定符和类型 | 字段和说明 |
|---|---|
protected AnnotationFinder |
annotationFinder
annotation finder
|
protected Set<Class<?>> |
nonAnnotatedClasses
non annotated classes
|
methodContainerFactories| 构造器和说明 |
|---|
ContainerMethodAnnotationProcessor(Collection<MethodContainerFactory> methodContainerFactories,
AnnotationFinder annotationFinder)
Create a
ContainerMethodAnnotationProcessor instance. |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
collectClassLevelAnnotatedMethods(Class<?> type,
Method[] methods,
MultiMap<Method,ContainerMethod> annotatedMethods)
Collect methods bound by class level annotation.
|
protected Method[] |
collectMethodLevelAnnotatedMethods(Class<?> type,
MultiMap<Method,ContainerMethod> annotatedMethods)
Collect methods annotated with
ContainerMethod. |
Collection<Container<Object>> |
process(Object target,
Class<?> type)
process target
|
protected Collection<Container<Object>> |
processAnnotatedMethod(Object target,
MultiMap<Method,ContainerMethod> annotatedMethods)
process annotated method.
|
protected Collection<ContainerMethod> |
resolveAnnotationsForClass(Class<?> type)
Resolve annotations for class.
|
protected Collection<ContainerMethod> |
resolveAnnotationsForMethod(Method method)
Resolve annotations for class.
|
createMethodContainer, findMatchedMethodForAnnotation, findMostMatchMethod, registerMethodContainerFactoryprotected final AnnotationFinder annotationFinder
public ContainerMethodAnnotationProcessor(Collection<MethodContainerFactory> methodContainerFactories, AnnotationFinder annotationFinder)
ContainerMethodAnnotationProcessor instance.methodContainerFactories - method container factoriesannotationFinder - annotation finderpublic final Collection<Container<Object>> process(Object target, Class<?> type)
target - targettype - typeprotected void collectClassLevelAnnotatedMethods(Class<?> type, Method[] methods, MultiMap<Method,ContainerMethod> annotatedMethods)
type - typemethods - all methods in typeannotatedMethods - annotated methodsprotected Method[] collectMethodLevelAnnotatedMethods(Class<?> type, MultiMap<Method,ContainerMethod> annotatedMethods)
ContainerMethod.type - typeannotatedMethods - annotated methodsprotected Collection<Container<Object>> processAnnotatedMethod(Object target, MultiMap<Method,ContainerMethod> annotatedMethods)
target - targetannotatedMethods - annotated methodsprotected Collection<ContainerMethod> resolveAnnotationsForClass(Class<?> type)
type - typeprotected Collection<ContainerMethod> resolveAnnotationsForMethod(Method method)
method - methodCopyright © 2024. All rights reserved.