feat: add composable annotations support - #920
Conversation
Task-1: Collect all annotation (include composite) map when initializing the read/write head property.
Task-2: - Introduced `AnnotatedTypeDescriptor` and `AnnotatedFieldDescriptor` abstract models to carry metadata parsing logic at the class and field dimensions, respectively. - Encapsulated the `AnnotatedClassUtils`, rewriting part of the `ClassUtils` logic based on `AnnotatedElementDescriptor`. - Introduced the `enableMetaMarked` configuration flag to ensure read/write stability when handling legacy ClassUtils logic (such as `declaredExcelContentProperty` and `declaredFields`).
# Conflicts: # fesod-sheet/src/test/java/org/apache/fesod/sheet/cache/CacheDataTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/AnnotatedFieldDescriptorTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/AnnotatedTypeDescriptorTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/AnnotationAttributesTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/AnnotationMapTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/AnnotationMetadataReaderTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/AnnotationMetadataResolverTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/AnnotationMetadataTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/composite/AnnotatedDescriptorAssertions.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/composite/CompositeAnnotationTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/composite/DirectAnnotationTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/composite/IntegrationAnnotations.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/composite/IntegrationCompositeAnnotationTest.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/composite/IntegrationExcelDatas.java # fesod-sheet/src/test/java/org/apache/fesod/sheet/style/composite/WorkbookAsserts.java
|
Hi @bengbengbalabalabeng. I noticed that this cool PR introduces Besides, in |
As for the design direction mentioned in #989, I don't have any concrete ideas yet, I'll add a follow-up comment once I have a clearer picture. As for the current PR, there's no need to worry for now. I may continue to break it down into smaller, more detailed drafts to track progress.
Thank you for the reminder :) |
Purpose of the pull request
Related: #918
Added composable annotations support. For more usage examples, please refer to #918.
What's changed?
@FesodMarkedand@FesodMarked.AliasFor, to expand theTarget-ElementType#ANNOTATION_TYPErestriction scope for other internal annotations except@ExcelIgnoreand@ExcelIgnoreUnannotated, making it convenient for users to define custom combined annotations.enableMetaMarkedto selectively enable composite annotation analysis. (Disabled by default)AnnotatedElementDescriptorto encapsulate the class/field-level element types and (composable) annotations inExcelHeadProperty.AnnotationMetadataReaderto refactor the internal annotation parsing and storage approach.AnnotatedClassUtilsutility class (similar toClassUtils) added to handle field parsing (read/write).Checklist