KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > bytecode > MockClassProvider


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.bytecode;
5
6 import com.tc.object.loaders.ClassProvider;
7 import com.tc.object.loaders.NamedClassLoader;
8
9
10 public class MockClassProvider implements ClassProvider {
11
12   public MockClassProvider() {
13     super();
14   }
15
16   public Class JavaDoc getClassFor(String JavaDoc className, String JavaDoc loaderDesc) throws ClassNotFoundException JavaDoc {
17     return getClass().getClassLoader().loadClass(className);
18
19   }
20
21   public String JavaDoc getLoaderDescriptionFor(Class JavaDoc clazz) {
22     return "";
23   }
24
25   public ClassLoader JavaDoc getClassLoader(String JavaDoc loaderDesc) {
26     return getClass().getClassLoader();
27   }
28
29   public String JavaDoc getLoaderDescriptionFor(ClassLoader JavaDoc loader) {
30     return "";
31   }
32
33   public void registerNamedLoader(NamedClassLoader loader) {
34     // do nothing
35
}
36
37 }
38
Popular Tags