Class InterfaceProxyGenerator

java.lang.Object
ai.timefold.jpyinterpreter.InterfaceProxyGenerator

public class InterfaceProxyGenerator extends Object
  • Constructor Details

    • InterfaceProxyGenerator

      public InterfaceProxyGenerator()
  • Method Details

    • generateProxyForFunction

      public static <T> Class<T> generateProxyForFunction(Class<T> interfaceClass, T interfaceInstance)
      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.