1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.jexl.util;
17
18 import org.apache.commons.jexl.util.introspection.Uberspect;
19 import org.apache.commons.jexl.util.introspection.UberspectImpl;
20 import org.apache.commons.jexl.util.introspection.UberspectLoggable;
21 import org.apache.commons.logging.Log;
22 import org.apache.commons.logging.LogFactory;
23
24 /***
25 * Little class to manage a Velocity uberspector (Vel 1.4+) for instrospective
26 * services
27 *
28 * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
29 * @version $Id: Introspector.java,v 1.6 2004/02/28 13:45:21 yoavs Exp $
30 */
31 public class Introspector
32 {
33 /***
34 * the uberspector from Velocity - handles all instrospection patterns
35 */
36 private static Uberspect uberSpect;
37
38 static {
39
40 Log logger = LogFactory.getLog(Introspector.class);
41
42 uberSpect = new UberspectImpl();
43 ((UberspectLoggable) uberSpect).setRuntimeLogger(logger);
44 }
45
46 /***
47 * For now, expose the raw uberspector to the AST
48 */
49 public static Uberspect getUberspect()
50 {
51 return uberSpect;
52 }
53 }