chaokunyang commented on code in PR #2701:
URL: https://github.com/apache/fory/pull/2701#discussion_r2447073970


##########
java/fory-core/src/main/java/org/apache/fory/resolver/TypeResolver.java:
##########
@@ -670,6 +674,82 @@ public final MetaStringResolver getMetaStringResolver() {
     return metaStringResolver;
   }
 
+  /**
+   * Get all registered classes across all GraalVM registries for native image 
compilation.
+   *
+   * @return unmodifiable set of all registered classes
+   */
+  public static Set<Class<?>> getAllRegisteredClasses() {
+    Set<Class<?>> allClasses = ConcurrentHashMap.newKeySet();
+    for (GraalvmClassRegistry registry : GRAALVM_REGISTRY.values()) {
+      allClasses.addAll(registry.registeredClasses);
+    }
+    return Collections.unmodifiableSet(allClasses);
+  }
+
+  /**
+   * Get all registered proxy interfaces across all GraalVM registries for 
native image compilation.
+   *
+   * @return unmodifiable set of all registered proxy interfaces
+   */
+  public static Set<Class<?>> getAllProxyInterfaces() {
+    Set<Class<?>> allInterfaces = ConcurrentHashMap.newKeySet();
+    for (GraalvmClassRegistry registry : GRAALVM_REGISTRY.values()) {
+      allInterfaces.addAll(registry.proxyInterfaces);
+    }
+    return Collections.unmodifiableSet(allInterfaces);
+  }
+
+  /**
+   * Register a class in the GraalVM registry for native image compilation. 
This should be called
+   * from {@link org.apache.fory.Fory#register} methods.
+   *
+   * @param cls the class to register
+   * @param configHash the configuration hash for the Fory instance
+   */
+  public static void registerClassForGraalvm(Class<?> cls, int configHash) {

Review Comment:
   ditto,and we can also remove `ForGraalvm` if we move those methods into 
`GraalvmSupport`



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to