1 4 package com.tc.object; 5 6 import com.tc.exception.ImplementMe; 7 import com.tc.object.dna.api.DNA; 8 9 public class TestObjectFactory implements TCObjectFactory { 10 11 public TCObject tcObject; 12 public Object peerObject; 13 14 public void setObjectManager(ClientObjectManager objectManager) { 15 return; 16 } 17 18 public TCObject getNewInstance(ObjectID id, Object peer, Class clazz) { 19 return tcObject; 20 } 21 22 public TCObject getNewInstance(ObjectID id, Class clazz) { 23 return tcObject; 24 } 25 26 public Object getNewPeerObject(TCClass type, Object parent) throws IllegalArgumentException , SecurityException { 27 return peerObject; 28 } 29 30 public Object getNewArrayInstance(TCClass type, int size) { 31 throw new ImplementMe(); 32 } 33 34 public Object getNewPeerObject(TCClass type) throws IllegalArgumentException , SecurityException { 35 return peerObject; 36 } 37 38 public Object getNewPeerObject(TCClass type, DNA dna) { 39 return peerObject; 40 } 41 42 } 43 | Popular Tags |