KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > python > core > IdImpl


1 package org.python.core;
2
3 public abstract class IdImpl {
4
5     public static IdImpl getInstance() {
6         if (System.getProperty("java.version").compareTo("1.2")>=0) {
7             try {
8                 return (IdImpl)Class.forName("org.python.core.IdImpl2").newInstance();
9             } catch(Throwable JavaDoc e) {
10                 return null;
11             }
12         } else {
13             return new IdImpl1();
14         }
15             
16     }
17     
18     public abstract long id(PyObject o);
19     public abstract String JavaDoc idstr(PyObject o);
20         
21     // o should not be an instance of a subclass of PyObject
22
public abstract long java_obj_id(Object JavaDoc o);
23     
24 }
25
Popular Tags