コード例 #1
0
 public combinationsWithReplacementDerived(PyType subtype) {
   super(subtype);
   slots = new PyObject[subtype.getNumSlots()];
   dict = subtype.instDict();
   if (subtype.needsFinalizer()) {
     FinalizeTrigger.ensureFinalizer(this);
   }
 }
コード例 #2
0
 public void setDict(PyObject newDict) {
   if (newDict instanceof PyStringMap || newDict instanceof PyDictionary) {
     dict = newDict;
     if (dict.__finditem__(PyString.fromInterned("__del__")) != null
         && !JyAttribute.hasAttr(this, JyAttribute.FINALIZE_TRIGGER_ATTR)) {
       FinalizeTrigger.ensureFinalizer(this);
     }
   } else {
     throw Py.TypeError("__dict__ must be set to a Dictionary " + newDict.getClass().getName());
   }
 }
コード例 #3
0
 public void __ensure_finalizer__() {
   FinalizeTrigger.ensureFinalizer(this);
 }