Package ai.timefold.jpyinterpreter
Class InterfaceProxyGenerator
java.lang.Object
ai.timefold.jpyinterpreter.InterfaceProxyGenerator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Class<T>generateProxyForClass(Class<T> interfaceClass, PythonLikeType delegateType) Generate an interface that construct a new instance of a type and delegate all calls to that type's methods.static <T> Class<T>generateProxyForFunction(Class<T> interfaceClass, T interfaceInstance) Generate an interface that just calls an existing instance of the interface.
-
Constructor Details
-
InterfaceProxyGenerator
public InterfaceProxyGenerator()
-
-
Method Details
-
generateProxyForFunction
Generate an interface that just calls an existing instance of the interface. Needed so Java libraries that construct new instances using the no-args constructor use the correct instance of the function (the one with __closure__ and other instance fields). -
generateProxyForClass
public static <T> Class<T> generateProxyForClass(Class<T> interfaceClass, PythonLikeType delegateType) Generate an interface that construct a new instance of a type and delegate all calls to that type's methods.
-