You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fesod.apache.org by "bengbengbalabalabeng (via GitHub)" <gi...@apache.org> on 2026/05/24 12:31:52 UTC

[PR] feat: add composable annotations support [fesod]

bengbengbalabalabeng opened a new pull request, #920:
URL: https://github.com/apache/fesod/pull/920

   <!--
   Thanks very much for contributing to Apache Fesod (Incubating)! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   Closed: #ISSUE
   Related: #ISSUE
   
   -->
   
   ## Purpose of the pull request
   
   Related: #918
   
   Added **composable annotations** support. For more usage examples, please refer to #918.
   
   <!-- Describe the purpose of this pull request. For example: Closed: #ISSUE-->
   
   ## What's changed?
   
   1. 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.
   2. Added `enableMetaMarked` to selectively enable composite annotation analysis. (Disabled by default)
   3. Defines `AnnotatedElementDescriptor` to encapsulate the class/field-level element types and (composable) annotations in `ExcelHeadProperty`.
   4. Define `AnnotationMetadataReader` to refactor the internal annotation parsing and storage approach.
   5. New `AnnotatedClassUtils` utility class (similar to `ClassUtils`) added to handle field parsing (read/write).
   6. Added unit tests and integration tests, covering scenarios such as field-level annotations, class-level annotations, and class + field - level annotations.
   
   Unresolved: #919
   
   ## Checklist
   
   - [x] I have read the [Contributor Guide](https://fesod.apache.org/community/contribution/).
   - [x] I have written the necessary doc or comment.
   - [x] I have added the necessary unit tests and all cases have passed.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org


Re: [PR] feat: add composable annotations support [fesod]

Posted by "nkuprins (via GitHub)" <gi...@apache.org>.
nkuprins commented on PR #920:
URL: https://github.com/apache/fesod/pull/920#issuecomment-5237630010

   Hi @bengbengbalabalabeng. I noticed that this cool PR introduces `AnnotatedClassUtils`. Have you read #989 by any chance? It seems that the issue raised there is also related to `AnnotatedClassUtils`. I would appreciate hearing your opinion on this :)
   I ask this because if this gets merged and later `ClassUtils` refactoring gets approved, then we **may** have two `@Deprecated` problems at once.
   
   Besides, in `AnnotatedClassUtils#doDeclaredFields` (line 317) there's `indexFieldMap.remove(index)`. That's the bug #977 fixed in `ClassUtils`, where it's now `indexFieldMap.remove(key)`. Not sure if you already noticed that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org


Re: [PR] feat: add composable annotations support [fesod]

Posted by "bengbengbalabalabeng (via GitHub)" <gi...@apache.org>.
bengbengbalabalabeng commented on PR #920:
URL: https://github.com/apache/fesod/pull/920#issuecomment-5239798768

   > I noticed that this cool PR introduces `AnnotatedClassUtils`. Have you read #989 by any chance? It seems that the issue raised there is also related to `AnnotatedClassUtils`. I would appreciate hearing your opinion on this :)
   > I ask this because if this gets merged and later `ClassUtils` refactoring gets approved, then we **may** have two `@Deprecated` problems at once.
   
   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.
   
   > Besides, in `AnnotatedClassUtils#doDeclaredFields` (line 317) there's `indexFieldMap.remove(index)`. That's the bug #977 fixed in `ClassUtils`, where it's now `indexFieldMap.remove(key)`. Not sure if you already noticed that.
   
   Thank you for the reminder :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fesod.apache.org
For additional commands, e-mail: commits-help@fesod.apache.org