public class AssembleMethodAnnotationHandler extends AbstractInternalProviderAssembleAnnotationHandler<AssembleMethod>
An AbstractStandardAssembleAnnotationHandler implementation for AssembleMethod annotation.
When processing AssembleMethod annotation,
it will create a Container for method which specified by ContainerMethod,
and then register the Container to AbstractInternalProviderAssembleAnnotationHandler.internalContainerProvider.
The target of method will be created by getTargetInstance(java.lang.Class<?>, cn.crane4j.annotation.AssembleMethod),
by default, it will create a new instance of target class.
AssembleMethod,
AbstractContainerMethodSupport| 限定符和类型 | 类和说明 |
|---|---|
protected class |
AssembleMethodAnnotationHandler.CacheableContainerMethodResolver
A resolve for
AssembleMethod. |
protected class |
AssembleMethodAnnotationHandler.ContainerMethodResolver
A resolve for
AssembleMethod. |
AbstractStandardAssembleAnnotationHandler.StandardAssembleAnnotation<A extends Annotation>, AbstractStandardAssembleAnnotationHandler.StandardAssembleAnnotationAdapter<A extends Annotation>AbstractStandardOperationAnnotationHandler.StandardAnnotation<A>, AbstractStandardOperationAnnotationHandler.StandardAnnotationAdapter<A extends Annotation>| 限定符和类型 | 字段和说明 |
|---|---|
protected AssembleMethodAnnotationHandler.ContainerMethodResolver |
containerMethodResolver |
INTERNAL_PROVIDER_SUFFIX, internalContainerProviderglobalConfigurationannotationFinder, annotationType, operationComparator| 构造器和说明 |
|---|
AssembleMethodAnnotationHandler(AnnotationFinder annotationFinder,
Crane4jGlobalConfiguration globalConfiguration,
Collection<MethodContainerFactory> methodContainerFactories,
PropertyMappingStrategyManager propertyMappingStrategyManager)
Create an
AssembleMethodAnnotationHandler instance. |
createInternalContainerProvider, getContainerNamespace, getInternalContainerProviderNamecreateOperation, determineKeyResolver, doResolve, parseAssembleOperationHandler, parseKeyType, parsePropertyMappings, parsePropToMapping, parserPropertyMappingStrategyparseAnnotationForClass, parseAnnotationForElement, parseAnnotationForFields, parseAnnotationForMethods, parseGroups, parseId, parseKey, parseSort, resolveprotected final AssembleMethodAnnotationHandler.ContainerMethodResolver containerMethodResolver
public AssembleMethodAnnotationHandler(AnnotationFinder annotationFinder, Crane4jGlobalConfiguration globalConfiguration, Collection<MethodContainerFactory> methodContainerFactories, PropertyMappingStrategyManager propertyMappingStrategyManager)
AssembleMethodAnnotationHandler instance.annotationFinder - annotation finderglobalConfiguration - global configurationmethodContainerFactories - method container factoriespropertyMappingStrategyManager - property mapping strategy managerprotected AssembleMethodAnnotationHandler.ContainerMethodResolver createContainerMethodResolver(Collection<MethodContainerFactory> methodContainerFactories)
methodContainerFactories - method container factoriesAssembleMethodAnnotationHandler.ContainerMethodResolver instanceprotected @NonNull Container<Object> createContainer(AbstractStandardAssembleAnnotationHandler.StandardAssembleAnnotation<AssembleMethod> standardAnnotation, String namespace)
createContainer 在类中 AbstractInternalProviderAssembleAnnotationHandler<AssembleMethod>standardAnnotation - standard annotationnamespace - namespaceContainer instantpublic void registerMethodContainerFactory(@NonNull MethodContainerFactory methodContainerFactory)
MethodContainerFactory instance.methodContainerFactory - method container factoryContainerMethodSupport#registerMethodContainerFactoryprotected String determineNamespace(AbstractStandardAssembleAnnotationHandler.StandardAssembleAnnotation<AssembleMethod> standardAnnotation)
determineNamespace 在类中 AbstractInternalProviderAssembleAnnotationHandler<AssembleMethod>standardAnnotation - standard annotationprotected AbstractStandardAssembleAnnotationHandler.StandardAssembleAnnotation<AssembleMethod> getStandardAnnotation(BeanOperations beanOperations, AnnotatedElement element, AssembleMethod annotation)
StandardAssembleAnnotation.getStandardAnnotation 在类中 AbstractStandardAssembleAnnotationHandler<AssembleMethod>beanOperations - bean operationselement - elementannotation - annotationStandardAssembleAnnotation instanceprotected @NonNull Class<?> resolveTargetType(AssembleMethod annotation)
annotation - annotationprotected @Nullable Object getTargetInstance(Class<?> targetType, AssembleMethod annotation)
targetType - target typeannotation - annotationCopyright © 2024. All rights reserved.