Java - Self expansion of QueryParameters without reflection #3965
Labels
enhancement
New feature or request
help wanted
Issue caused by core project dependency modules or library
Java
WIP
Milestone
I was reviewing this issue, and this proposal is aimed to fully remove all the usages of reflection in Java.
The
QueryParameter
type classes are currently using annotations, in combination with reflection up intoabstractions
(not easily swappable in user-land).I do believe that a generated approach is preferable over the current implementation, it will also more closely resemble the design of the serialization/deserialization of the objects.
Code currently generated
Proposal
the corresponding implementation of
addQueryParameter
simplifies to:and the rest should be changed accordingly to make use of the new instance method.
After this change, we can safely delete the
QueryParameter
annotation, and the generated LOCs will be comparable with the current implementation.I'm happy to hear feedback on this proposal and I can volunteer to implement it as I believe that removing reflection is one key aspect that will determine the success of Kiota in the Java ecosystem (e.g. being able to execute Kiota with zero configuration on
native-image
is the end goal).The text was updated successfully, but these errors were encountered: