1 3 package org.python.core; 4 5 import java.lang.ref.*; 6 import java.util.*; 7 8 public class WeakInternalTables extends AutoInternalTables { 9 10 private static class Ref extends WeakReference { 11 Object key; 12 short type; 13 14 Ref(short type,Object key, Object obj, ReferenceQueue queue) { 15 super(obj,queue); 16 this.type=type; 17 this.key=key; 18 } 19 } 20 21 protected Reference newAutoRef(short type,Object key, Object obj) { 22 return new Ref(type,key,obj,queue); 23 } 24 25 protected short getAutoRefType(Reference ref) { 26 return ((Ref)ref).type; 27 } 28 29 30 protected Object getAutoRefKey(Reference ref) { 31 return ((Ref)ref).key; 32 } 33 34 } 35 | Popular Tags |