chaokunyang commented on code in PR #2701:
URL: https://github.com/apache/fory/pull/2701#discussion_r2424623491
##########
java/fory-core/src/main/java/org/apache/fory/Fory.java:
##########
@@ -1764,4 +1768,47 @@ public MetaCompressor getMetaCompressor() {
public static ForyBuilder builder() {
return new ForyBuilder();
}
+
+ /**
+ * Get all registered classes for GraalVM native image compilation. This is
a convenience method
+ * that delegates to {@link TypeResolver#getAllRegisteredClasses()}.
+ *
+ * @return unmodifiable set of all registered classes
+ */
+ public static Set<Class<?>> getRegisteredClasses() {
+ return TypeResolver.getAllRegisteredClasses();
+ }
+
+ /**
+ * Get all registered proxy interfaces for GraalVM native image compilation.
This is a convenience
+ * method that delegates to {@link TypeResolver#getAllProxyInterfaces()}.
+ *
+ * @return unmodifiable set of all registered proxy interfaces
+ */
+ public static Set<Class<?>> getProxyInterfaces() {
+ return TypeResolver.getAllProxyInterfaces();
+ }
+
+ /**
+ * Register a proxy interface for GraalVM native image compilation. This is
a convenience method
+ * that delegates to {@link TypeResolver#registerProxyInterfaceForGraalvm}.
+ *
+ * <p>Note: This registers the proxy interface globally across all Fory
configurations. If you
+ * need per-configuration registration, use the TypeResolver methods
directly.
+ *
+ * @param proxyInterface the proxy interface to register
+ * @throws NullPointerException if proxyInterface is null
+ * @throws IllegalArgumentException if proxyInterface is not an interface
+ */
+ public static void addProxyInterface(Class<?> proxyInterface) {
Review Comment:
I prefer not adding API to Fory, since those API are just used by graalvm.
We could let it at TypeResolver, and you invoke TypeResolver API directly in
GraalVMmFeature
--
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]