001: /*
002: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
003: */
004: package org.terracotta.dso;
005:
006: import com.tc.asm.ClassAdapter;
007: import com.tc.asm.ClassVisitor;
008: import com.tc.asm.ClassWriter;
009: import com.tc.aspectwerkz.reflect.ClassInfo;
010: import com.tc.aspectwerkz.reflect.FieldInfo;
011: import com.tc.aspectwerkz.reflect.MemberInfo;
012: import com.tc.config.schema.NewCommonL1Config;
013: import com.tc.config.schema.builder.DSOApplicationConfigBuilder;
014: import com.tc.object.Portability;
015: import com.tc.object.bytecode.ClassAdapterFactory;
016: import com.tc.object.bytecode.TransparencyClassAdapter;
017: import com.tc.object.config.ClassReplacementMapping;
018: import com.tc.object.config.ConfigLockLevel;
019: import com.tc.object.config.DSOClientConfigHelper;
020: import com.tc.object.config.DSOSpringConfigHelper;
021: import com.tc.object.config.DistributedMethodSpec;
022: import com.tc.object.config.Lock;
023: import com.tc.object.config.LockDefinition;
024: import com.tc.object.config.LockDefinitionImpl;
025: import com.tc.object.config.ModuleSpec;
026: import com.tc.object.config.Root;
027: import com.tc.object.config.StandardDSOClientConfigHelper;
028: import com.tc.object.config.TransparencyClassSpec;
029: import com.tc.object.config.TransparencyClassSpecImpl;
030: import com.tc.object.config.schema.DSOInstrumentationLoggingOptions;
031: import com.tc.object.config.schema.DSORuntimeLoggingOptions;
032: import com.tc.object.config.schema.DSORuntimeOutputOptions;
033: import com.tc.object.config.schema.InstrumentedClass;
034: import com.tc.object.logging.InstrumentationLogger;
035: import com.terracottatech.config.Modules;
036:
037: import java.net.URL;
038: import java.util.Collection;
039: import java.util.Iterator;
040: import java.util.Map;
041:
042: public class FakeDSOClientConfigHelper implements
043: StandardDSOClientConfigHelper, DSOClientConfigHelper {
044:
045: public String[] getMissingRootDeclarations(ClassInfo classInfo) {
046: return new String[0];
047: }
048:
049: public void addAutoLockExcludePattern(String expression) {
050: /**/
051: }
052:
053: public void addAutolock(String methodPattern, ConfigLockLevel type) {
054: /**/
055: }
056:
057: public void addClassReplacement(String originalClassName,
058: String replacementClassName, URL replacementResource) {
059: /**/
060: }
061:
062: public void addClassResource(String className, URL resource) {
063: /**/
064: }
065:
066: public void addCustomAdapter(String name,
067: ClassAdapterFactory adapterFactory) {
068: /**/
069: }
070:
071: public void addIncludePattern(String classPattern) {
072: /**/
073: }
074:
075: public void addIncludePattern(String classname,
076: boolean honorTransient) {
077: /**/
078: }
079:
080: public void addIncludePattern(String expression,
081: boolean honorTransient,
082: boolean oldStyleCallConstructorOnLoad, boolean honorVolatile) {
083: /**/
084: }
085:
086: public void addLock(String methodPattern,
087: LockDefinition lockDefinition) {
088: /**/
089: }
090:
091: public void addPermanentExcludePattern(String pattern) {
092: /**/
093: }
094:
095: public void addReadAutolock(String methodPattern) {
096: /**/
097: }
098:
099: public void addRoot(String rootName, String rootFieldName) {
100: /**/
101: }
102:
103: public void addWriteAutolock(String methodPattern) {
104: /**/
105: }
106:
107: public void allowCGLIBInstrumentation() {
108: /**/
109: }
110:
111: public LockDefinition createLockDefinition(String name,
112: ConfigLockLevel level) {
113: return new LockDefinitionImpl(name, level);
114: }
115:
116: public TransparencyClassSpec getOrCreateSpec(String className) {
117: return new TransparencyClassSpecImpl(className, this );
118: }
119:
120: public TransparencyClassSpec getOrCreateSpec(String className,
121: String applicator) {
122: return new TransparencyClassSpecImpl(className, this );
123: }
124:
125: public void addApplicationName(String name) {
126: /**/
127: }
128:
129: public void addAspectModule(String pattern, String moduleName) {
130: /**/
131: }
132:
133: public void addDSOSpringConfig(DSOSpringConfigHelper config) {
134: /**/
135: }
136:
137: public void addDistributedMethodCall(DistributedMethodSpec dms) {
138: /**/
139: }
140:
141: public void addExcludePattern(String expression) {
142: /**/
143: }
144:
145: public void addIncludeAndLockIfRequired(String expression,
146: boolean honorTransient,
147: boolean oldStyleCallConstructorOnLoad,
148: boolean honorVolatile, String lockExpression,
149: ClassInfo classInfo) {
150: /**/
151: }
152:
153: public void addInstrumentationDescriptor(InstrumentedClass classDesc) {
154: /**/
155: }
156:
157: public void addRepository(String location) {
158: /**/
159: }
160:
161: public void addModule(String name, String version) {
162: /**/
163: }
164:
165: public void addReadAutoSynchronize(String methodPattern) {
166: /**/
167: }
168:
169: public void addRoot(Root root, boolean addSpecForClass) {
170: /**/
171: }
172:
173: public void addSynchronousWriteApplication(String name) {
174: /**/
175: }
176:
177: public void addSynchronousWriteAutolock(String methodPattern) {
178: /**/
179: }
180:
181: public void addTransient(String className, String fieldName) {
182: /**/
183: }
184:
185: public void addUserDefinedBootSpec(String className,
186: TransparencyClassSpec spec) {
187: /**/
188: }
189:
190: public void addWriteAutoSynchronize(String methodPattern) {
191: /**/
192: }
193:
194: public TransparencyClassSpec[] getAllSpecs() {
195: return null;
196: }
197:
198: public Iterator getAllUserDefinedBootSpecs() {
199: return null;
200: }
201:
202: public Map getAspectModules() {
203: return null;
204: }
205:
206: public Class getChangeApplicator(Class clazz) {
207: return null;
208: }
209:
210: public ClassReplacementMapping getClassReplacementMapping() {
211: return null;
212: }
213:
214: public URL getClassResource(String className) {
215: return null;
216: }
217:
218: public Collection getDSOSpringConfigs() {
219: return null;
220: }
221:
222: public DistributedMethodSpec getDmiSpec(MemberInfo memberInfo) {
223: return null;
224: }
225:
226: public int getFaultCount() {
227: return 0;
228: }
229:
230: public DSOInstrumentationLoggingOptions getInstrumentationLoggingOptions() {
231: return null;
232: }
233:
234: public String getLogicalExtendingClassName(String className) {
235: return null;
236: }
237:
238: public Modules getModulesForInitialization() {
239: return null;
240: }
241:
242: public NewCommonL1Config getNewCommonL1Config() {
243: return null;
244: }
245:
246: public String getOnLoadMethodIfDefined(ClassInfo classInfo) {
247: return null;
248: }
249:
250: public String getOnLoadScriptIfDefined(ClassInfo classInfo) {
251: return null;
252: }
253:
254: public Portability getPortability() {
255: return null;
256: }
257:
258: public String getPostCreateMethodIfDefined(String className) {
259: return null;
260: }
261:
262: public String getPreCreateMethodIfDefined(String className) {
263: return null;
264: }
265:
266: public int getSessionLockType(String appName) {
267: return 0;
268: }
269:
270: public TransparencyClassSpec getSpec(String className) {
271: return null;
272: }
273:
274: public Class getTCPeerClass(Class clazz) {
275: return null;
276: }
277:
278: public boolean hasIncludeExcludePattern(ClassInfo classInfo) {
279: return false;
280: }
281:
282: public boolean hasIncludeExcludePatterns() {
283: return false;
284: }
285:
286: public DSOInstrumentationLoggingOptions instrumentationLoggingOptions() {
287: return null;
288: }
289:
290: public boolean isCallConstructorOnLoad(ClassInfo classInfo) {
291: return false;
292: }
293:
294: public boolean isDSOSessions(String name) {
295: return false;
296: }
297:
298: public boolean isLockMethod(MemberInfo memberInfo) {
299: return false;
300: }
301:
302: public boolean isLogical(String theClass) {
303: return false;
304: }
305:
306: public boolean isNeverAdaptable(ClassInfo classInfo) {
307: return false;
308: }
309:
310: public boolean isPortableModuleClass(Class clazz) {
311: return false;
312: }
313:
314: public boolean isRoot(FieldInfo fi) {
315: return false;
316: }
317:
318: public boolean isRootDSOFinal(FieldInfo fi) {
319: return false;
320: }
321:
322: public boolean isTransient(int modifiers, ClassInfo classInfo,
323: String field) {
324: return false;
325: }
326:
327: public boolean isUseNonDefaultConstructor(Class clazz) {
328: return false;
329: }
330:
331: public boolean isVolatile(int modifiers, ClassInfo classInfo,
332: String field) {
333: return false;
334: }
335:
336: public LockDefinition[] lockDefinitionsFor(MemberInfo memberInfo) {
337: return null;
338: }
339:
340: public boolean matches(Lock lock, MemberInfo methodInfo) {
341: return false;
342: }
343:
344: public boolean matches(String expression, MemberInfo methodInfo) {
345: return false;
346: }
347:
348: public boolean removeCustomAdapter(String name) {
349: return false;
350: }
351:
352: public void removeSpec(String className) {
353: /**/
354: }
355:
356: public String rootNameFor(FieldInfo fi) {
357: return null;
358: }
359:
360: public DSORuntimeLoggingOptions runtimeLoggingOptions() {
361: return null;
362: }
363:
364: public DSORuntimeOutputOptions runtimeOutputOptions() {
365: return null;
366: }
367:
368: public void setFaultCount(int count) {
369: /**/
370: }
371:
372: public void setModuleSpecs(ModuleSpec[] pluginSpecs) {
373: /**/
374: }
375:
376: public boolean shouldBeAdapted(ClassInfo classInfo) {
377: return false;
378: }
379:
380: public void verifyBootJarContents() {
381: /**/
382: }
383:
384: public void writeTo(DSOApplicationConfigBuilder appConfigBuilder) {
385: /**/
386: }
387:
388: public TransparencyClassAdapter createDsoClassAdapterFor(
389: ClassVisitor writer, ClassInfo classInfo,
390: InstrumentationLogger lgr, ClassLoader caller,
391: final boolean forcePortable, boolean honorTransient) {
392: return null;
393: }
394:
395: public ClassAdapter createClassAdapterFor(ClassWriter writer,
396: ClassInfo classInfo, InstrumentationLogger lgr,
397: ClassLoader caller) {
398: return null;
399: }
400:
401: public ClassAdapter createClassAdapterFor(ClassWriter writer,
402: ClassInfo classInfo, InstrumentationLogger lgr,
403: ClassLoader caller, boolean disableSuperClassTypeChecking) {
404: return null;
405: }
406:
407: public void addCustomAdapter(String name, String factoryName) {
408: /**/
409: }
410:
411: public void addNonportablePattern(String pattern) {
412: /**/
413: }
414:
415: public ClassAdapterFactory getCustomAdapter(ClassInfo classInfo) {
416: return null;
417: }
418:
419: public boolean hasCustomAdapter(ClassInfo classInfo) {
420: return false;
421: }
422:
423: public boolean reflectionEnabled() {
424: return false;
425: }
426: }
|