Class JythonVersionAdapter

java.lang.Object
freemarker.ext.jython.JythonVersionAdapter

public abstract class JythonVersionAdapter extends Object
Functions that has a different implementation depending on the Jython version used. This was introduced to work around class-loading errors because of different classes/methods being present in different Jython versions.
  • Constructor Details

    • JythonVersionAdapter

      public JythonVersionAdapter()
  • Method Details

    • isPyInstance

      public abstract boolean isPyInstance(Object obj)
      Returns obj instanceof Py[Java]Instance.
    • pyInstanceToJava

      public abstract Object pyInstanceToJava(Object pyInstance)
      Returns ((PyInstance) py[Java]Instance).__tojava__(java.lang.Object.class).
    • getPythonClassName

      public abstract String getPythonClassName(org.python.core.PyObject pyObject)
      Returns pyObject.__class__.__name__