public interface OperationAnnotationHandler extends Sorted
用于处理元素上的注解,将其解析为AssembleOperation或DisassembleOperation的处理器。
通常情况下,一个处理器通常只解析元素上的某种特定注解,
例如AssembleAnnotationHandler只用于从元素中解析AssembleOperation。
不同的处理器将会被注册到配置解析器中,
最终由配置解析器来依次调用注解处理器来彻底的解析元素上的所有的注解配置。
对应实现类,推荐继承AbstractStandardOperationAnnotationHandler类,
或AbstractStandardAssembleAnnotationHandler类,
这两个模板类都预先实现了标准组件的解析和构建KeyTriggerOperation的逻辑,
并且提供了一些便捷的方法来从标准注解中获取通用的配置信息。
A handler that resolves AssembleOperation or DisassembleOperation
from annotation on the element to BeanOperations.getSource().
Generally, a handler typically only resolves the specific annotation from the element,
for example, AssembleAnnotationHandler resolve AssembleOperation from the element.
TypeHierarchyBeanOperationParser will hold multiple resolvers to resolve different annotations.
For implementors of assemble operation annotation handler,
it is recommended to derive from the provided AbstractStandardAssembleAnnotationHandler class,
which pre-implements the defined the logic of parsing and
constructing AssembleOperation based on standard components.
AbstractStandardAssembleAnnotationHandler,
TypeHierarchyBeanOperationParser| 限定符和类型 | 方法和说明 |
|---|---|
void |
resolve(BeanOperationParser parser,
BeanOperations beanOperations)
Resolve operations from element.
|
void resolve(BeanOperationParser parser, BeanOperations beanOperations)
parser - parserbeanOperations - bean operations to be handlerCopyright © 2024. All rights reserved.