feat: add composable annotation support and meta-annotation processing - #1076
Open
bengbengbalabalabeng wants to merge 12 commits into
Open
feat: add composable annotation support and meta-annotation processing#1076bengbengbalabalabeng wants to merge 12 commits into
bengbengbalabalabeng wants to merge 12 commits into
Conversation
- Introduce two meta-annotations, @FesodMarked and @FesodMarked.AliasFor, to expand the Target - ElementType#ANNOTATION_TYPE restriction scope for other internal annotations except @ExcelIgnore and @ExcelIgnoreUnannotated, making it convenient for users to define custom combined annotations. - Define AnnotatedElementUtils to refactor the internal annotation parsing and access. - Added unit tests for AnnotatedElementUtils, and covering: - Merge priority - AliasFor semantics - Synthesized proxies - Fail-fast validation
Simplify the handling of annotation types declared more than once during scanning into a single rule: the first occurrence wins wholesale.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the pull request
As title.
Related: #918
Closed: #920
(previous development draft)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 (Included third-party annotations).AnnotatedElementUtilsutility class to handle composable-annotations lookup.ClassUtilsandExcelWriteHeadProperty, covering both read and write paths; behavior of directly-declared annotations is unchanged.Example
Precedence and Override Rules
(Detailed examples are provided in
annotation.md; only the core rules are listed here.)@FesodMarked.AliasForvalues (including defaults) > Static preset values.Checklist