Make @RegisterForReflection work with plain strings as at this moment private classes can't be registered for reflection using this approach.
Additional details are in https://stackoverflow.com/questions/61611441/quarkus-native-and-org-kohsukegithub-api-failed-to-deserialize-exception
To introduce an option for string-based definition new field would be required in https://github.com/quarkusio/quarkus/blob/master/core/runtime/src/main/java/io/quarkus/runtime/annotations/RegisterForReflection.java#L32 ?
Or is there a trick which could be applied to Class<?>[] targets() default {};?
Hi @rsvoboda , I recently came to know about Quarkus and I'd like to contribute to codebase. Please allow me to work on this issue.
We can expose a new variable to fix this issue and add the handling for same in RegisterForReflectionBuildStep.
String[] names() default {};
Please let me know your thoughts on this.
hi @lower-case thanks for the interest and welcome. Feel free to give to take a shot at the issue. Ping us if you need any help, also do not hesitate to open a draft PR once you have a working something
One thing to consider is when somebody defines both targets and names.
Older targets wins or items from targets and names should be combined?
Hey @rsvoboda , I suggest we should combine both, Users will mostly use _targets_ annotation (as it's less error prone) and will use the _names_ only if they have to register private classes( though can register both private and public classes). I'm working on draft PR and I'll push it soon.
Also, Please suggest If an explicit validation check is required to make sure that user is not using the same class more than once.
I'm working on draft PR and I'll push it soon.
So cool.
Also, Please suggest If an explicit validation check is required to make sure that user is not using the same class more than once.
I'd not throw an exception in this case but silently ignoring duplicates.
Hey @machi1990 @rsvoboda Please review this Draft PR and provide your feedback. Please let me know If I've missed some convention or I've missed something. I'm going through the codebase to get an idea of testing framework for this fix.