KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > jodd > introspector > DefaultIntrospector


1 // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved.
2

3 package jodd.introspector;
4
5 /**
6  * Default {@link Introspector} simple wraps Interceptors anda delegates
7  * method calls for simpler usage.
8  */

9 public class DefaultIntrospector {
10
11     /**
12      * Returns class descriptor for specified type.
13      */

14     public static ClassDescriptor lookup(Class JavaDoc type) {
15         return Introspector.DEFAULT.lookup(type);
16     }
17
18     /**
19      * Registers new type.
20      */

21     public static ClassDescriptor register(Class JavaDoc type) {
22         return Introspector.DEFAULT.register(type);
23     }
24
25     /**
26      * Clears cache.
27      */

28     public static void resetCache() {
29         Introspector.DEFAULT.reset();
30     }
31
32     /**
33      * Returns a string with some basic statistics information.
34      */

35     public static String JavaDoc getStatistics() {
36         return Introspector.DEFAULT.getStatistics();
37     }
38
39     /**
40      * Specifies custom global introspector.
41      */

42     public static void setDefaultIntrospector(Introspector i) {
43         if (i != null) {
44             Introspector.DEFAULT = i;
45         }
46     }
47
48
49 }
Popular Tags