Package freemarker.ext.jython
Class JythonVersionAdapter
java.lang.Object
freemarker.ext.jython.JythonVersionAdapter
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
getPythonClassName(org.python.core.PyObject pyObject)
ReturnspyObject.__class__.__name__
abstract boolean
isPyInstance(Object obj)
Returnsobj instanceof Py[Java]Instance
.abstract Object
pyInstanceToJava(Object pyInstance)
Returns((PyInstance) py[Java]Instance).__tojava__(java.lang.Object.class)
.
-
Constructor Details
-
JythonVersionAdapter
public JythonVersionAdapter()
-
-
Method Details
-
isPyInstance
Returnsobj instanceof Py[Java]Instance
. -
pyInstanceToJava
Returns((PyInstance) py[Java]Instance).__tojava__(java.lang.Object.class)
. -
getPythonClassName
ReturnspyObject.__class__.__name__
-