001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
003: * notice. All rights reserved.
004: */
005: package com.tc.object;
006:
007: import com.tc.exception.ImplementMe;
008: import com.tc.object.dna.api.DNA;
009: import com.tc.object.dna.api.DNAWriter;
010: import com.tc.object.field.TCField;
011: import com.tc.object.tx.optimistic.OptimisticTransactionManager;
012:
013: import java.lang.reflect.Constructor;
014: import java.lang.reflect.Field;
015: import java.util.Map;
016:
017: public class MockTCClass implements TCClass {
018: private String name = MockTCClass.class.getName();
019: private final boolean isIndexed;
020: private final boolean isLogical;
021:
022: public MockTCClass(boolean isIndexed, boolean isLogical) {
023: this .isIndexed = isIndexed;
024: this .isLogical = isLogical;
025: }
026:
027: public TCField[] getPortableFields() {
028: throw new ImplementMe();
029: }
030:
031: public TraversedReferences getPortableObjects(Object pojo,
032: TraversedReferences addTo) {
033: throw new ImplementMe();
034: }
035:
036: public Constructor getConstructor() {
037: throw new ImplementMe();
038: }
039:
040: public String getName() {
041: return this .name;
042: }
043:
044: public Class getComponentType() {
045: throw new ImplementMe();
046: }
047:
048: public TCClass getSuperclass() {
049: throw new ImplementMe();
050: }
051:
052: public boolean isLogical() {
053: return this .isLogical;
054: }
055:
056: public TCField getField(String fieldName) {
057: throw new ImplementMe();
058: }
059:
060: public boolean isIndexed() {
061: return this .isIndexed;
062: }
063:
064: public void hydrate(TCObject tcObject, DNA dna, Object pojo,
065: boolean force) {
066: throw new ImplementMe();
067: }
068:
069: public void dehydrate(TCObject tcObject, DNAWriter writer,
070: Object pojo) {
071: throw new ImplementMe();
072: }
073:
074: public Field getParentField() {
075: throw new ImplementMe();
076: }
077:
078: public String getParentFieldName() {
079: return name + ".this$0";
080: }
081:
082: public String getDefiningLoaderDescription() {
083: return "";
084: }
085:
086: public boolean isNonStaticInner() {
087: throw new ImplementMe();
088: }
089:
090: public TCObject createTCObject(ObjectID id, Object peer) {
091: throw new ImplementMe();
092: }
093:
094: public boolean hasOnLoadExecuteScript() {
095: return false;
096: }
097:
098: public String getOnLoadExecuteScript() {
099:
100: return null;
101: }
102:
103: public boolean hasOnLoadMethod() {
104: return false;
105: }
106:
107: public String getOnLoadMethod() {
108: return null;
109: }
110:
111: public boolean isUseNonDefaultConstructor() {
112: return false;
113: }
114:
115: public Object getNewInstanceFromNonDefaultConstructor(DNA dna) {
116: throw new ImplementMe();
117: }
118:
119: public Class getPeerClass() {
120: return getClass();
121: }
122:
123: public Map connectedCopy(Object source, Object dest, Map visited,
124: OptimisticTransactionManager txManager) {
125: throw new ImplementMe();
126: }
127:
128: public String getFieldNameByOffset(long fieldOffset) {
129: throw new ImplementMe();
130: }
131:
132: public ClientObjectManager getObjectManager() {
133: throw new ImplementMe();
134: }
135:
136: public boolean isProxyClass() {
137: return false;
138: }
139:
140: public String getExtendingClassName() {
141: return getName();
142: }
143:
144: public boolean isEnum() {
145: return false;
146: }
147:
148: public boolean isPortableField(long fieldOffset) {
149: throw new ImplementMe();
150: }
151:
152: }
|