1 5 package com.tc.object.bytecode; 6 7 import com.tc.object.TraversedReference; 8 import com.tc.object.appevent.NonPortableEventContext; 9 10 import java.util.Collections ; 11 import java.util.Set ; 12 13 16 public class NonDistributableObjectRegistry { 17 18 { 19 if (true) throw new UnsupportedOperationException (); 24 } 25 26 private static final NonDistributableObjectRegistry instance = new NonDistributableObjectRegistry(); 27 28 private Set nonDistributables = null; 29 private boolean added = false; 30 31 public boolean isAdded() { 32 return added; 33 } 34 35 public void setAdded() { 36 added = true; 37 } 38 39 private NonDistributableObjectRegistry() { 40 nonDistributables = Collections.unmodifiableSet(Collections.EMPTY_SET); 41 42 } 45 46 public static NonDistributableObjectRegistry getInstance() { 47 return instance; 48 } 49 50 public boolean shouldTraverse(Object obj) { 51 return obj != null && nonDistributables.contains(obj) == false; 52 } 53 54 public Set getNondistributables() { 55 return nonDistributables; 56 } 57 58 public void checkPortability(TraversedReference obj, Class referringClass, NonPortableEventContext context) { 59 } 61 62 } 63 | Popular Tags |