org.python.core.IdImpl Maven / Gradle / Ivy
Go to download
Jython is an implementation of the high-level, dynamic, object-oriented
language Python written in 100% Pure Java, and seamlessly integrated with
the Java platform. It thus allows you to run Python on any Java platform.
package org.python.core;
public abstract class IdImpl {
public static IdImpl getInstance() {
if (System.getProperty("java.version").compareTo("1.2") >= 0) {
try {
return (IdImpl) Class.forName("org.python.core.IdImpl2")
.newInstance();
} catch (Throwable e) {
return null;
}
} else {
return new IdImpl1();
}
}
public abstract long id(PyObject o);
public abstract String idstr(PyObject o);
// o should not be an instance of a subclass of PyObject
public abstract long java_obj_id(Object o);
}