Skip to content

[GR-72636] Move guest code out of ImageClassLoader into GuestTypes#13153

Closed
graalvmbot wants to merge 2 commits into
masterfrom
ds/GR-72636
Closed

[GR-72636] Move guest code out of ImageClassLoader into GuestTypes#13153
graalvmbot wants to merge 2 commits into
masterfrom
ds/GR-72636

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

This PR refactors the Native Image build pipeline to introduce a clear separation between guest (application code) and builder (image builder code) class handling by extracting guest-related logic from ImageClassLoader into a new GuestTypes class.

Key Changes:

  • Introduced the GuestTypes class to encapsulate all queries, analysis, and metadata collection related to guest/application types, methods, and fields.
  • Removed guest-related type/method/field management from ImageClassLoader and delegated queries (e.g., findAnnotatedMethods, findSubtypes, etc.) to GuestTypes.
  • Adjusted supporting code to reflect the new architecture:
    • Moved methods such as findSubtypes, findAnnotatedMethods, and findAnnotatedFields to GuestTypes.
    • Updated feature implementations and registration code to use GuestTypes for all guest code introspection.
    • Modified handling of class- and package-based options parsing (e.g., for reflection, preservation, dynamic access) to use GuestTypes.
  • Updated library import and annotation processing logic (e.g., for C libraries, JNIAccess, etc.) to leverage JVMCI reflection throughout.
  • Made minor related fixes in type resolution, class initialization support, and metrics/utility classes to ensure consistent use of GuestTypes.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 16, 2026
@graalvmbot graalvmbot closed this Mar 16, 2026
@graalvmbot graalvmbot deleted the ds/GR-72636 branch March 16, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants