01: // Copyright (c) 2003-2007, Jodd Team (jodd.sf.net). All Rights Reserved.
02:
03: package jodd.introspector;
04:
05: /**
06: * Default {@link Introspector} simple wraps Interceptors anda delegates
07: * method calls for simpler usage.
08: */
09: public class DefaultIntrospector {
10:
11: /**
12: * Returns class descriptor for specified type.
13: */
14: public static ClassDescriptor lookup(Class type) {
15: return Introspector.DEFAULT.lookup(type);
16: }
17:
18: /**
19: * Registers new type.
20: */
21: public static ClassDescriptor register(Class 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 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: }
|