01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object;
05:
06: import com.tc.exception.ImplementMe;
07: import com.tc.object.dna.api.DNA;
08:
09: 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)
27: throws IllegalArgumentException, SecurityException {
28: return peerObject;
29: }
30:
31: public Object getNewArrayInstance(TCClass type, int size) {
32: throw new ImplementMe();
33: }
34:
35: public Object getNewPeerObject(TCClass type)
36: throws IllegalArgumentException, SecurityException {
37: return peerObject;
38: }
39:
40: public Object getNewPeerObject(TCClass type, DNA dna) {
41: return peerObject;
42: }
43:
44: }
|