-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend ReflectiveClassBuildItem to support queryOnly option #42035
Extend ReflectiveClassBuildItem to support queryOnly option #42035
Conversation
This comment has been minimized.
This comment has been minimized.
Can you please update the description of the PR and add some Javadoc in the code to describe what exactly Thanks |
a108468
to
a087e59
Compare
@geoand done, please have another look and let me know if it's clear now. |
queryOnly registrations enables us to register only the metadata without the actual code, essentially reducing the native executable size. For instance, if some code invokes getDeclaredMethods on a class to see if a specific method is available we don't actually need all the methods bundled in the native executable, so we could use queryAllMethods instead of methods (which will also pull in the code of all methods). Note that for the time being we only extend it to support queryAllDeclaredConstructors and queryAllMethods since we don't have an option to register only public methods. Closes quarkusio#41999
a087e59
to
082269d
Compare
Very nice, thanks! |
Status for workflow
|
Fix constructors and queryConstructors check in ReflectiveClassBuildItem Follow up to quarkusio#42035
Fix constructors and queryConstructors check in ReflectiveClassBuildItem Follow up to quarkusio#42035
Fix constructors and queryConstructors check in ReflectiveClassBuildItem Follow up to quarkusio#42035
Configures whether declared methods should be registered for reflection, for query purposes only, i.e. {@link Class#getMethods()}. Setting this enables getting all declared methods for the class but does not allow invoking them reflectively. Follow up to quarkusio#42035
Configures whether declared methods should be registered for reflection, for query purposes only, i.e. {@link Class#getMethods()}. Setting this enables getting all declared methods for the class but does not allow invoking them reflectively. Follow up to quarkusio#42035
Configures whether declared methods should be registered for reflection, for query purposes only, i.e. {@link Class#getMethods()}. Setting this enables getting all declared methods for the class but does not allow invoking them reflectively. Follow up to quarkusio#42035
Configures whether declared methods should be registered for reflection, for query purposes only, i.e. {@link Class#getMethods()}. Setting this enables getting all declared methods for the class but does not allow invoking them reflectively. Follow up to quarkusio#42035
Fix constructors and queryConstructors check in ReflectiveClassBuildItem Follow up to quarkusio#42035
queryOnly
registrations enable us to register only the metadata without the actual code, essentially reducing the native executable size. For instance, if some code invokesgetDeclaredMethods
on a class to see if a specific method is available we don't actually need all the methods bundled in the native executable, we just need their metadata. So we could usequeryAllMethods
instead ofmethods
(which will also pull in the code of all methods).Note that for the time being we only extend it to support
queryAllDeclaredConstructors and queryAllMethods since we don't have an
option to register only public methods.
Closes #41999