All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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.

There is a newer version: 2.7.4
Show newest version
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);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy