org.apache.velocity.util.introspection
Class UberspectImpl

java.lang.Object
  |
  +--org.apache.velocity.util.introspection.UberspectImpl
All Implemented Interfaces:
Uberspect, UberspectLoggable

public class UberspectImpl
extends java.lang.Object
implements Uberspect, UberspectLoggable

Implementation of Uberspect to provide the default introspective functionality of Velocity

Version:
$Id: UberspectImpl.java,v 1.2.4.1 2004/03/03 23:23:08 geirm Exp $
Author:
Geir Magnusson Jr.

Inner Class Summary
 class UberspectImpl.VelGetterImpl
           
 class UberspectImpl.VelMethodImpl
          Implementation of VelMethod
 class UberspectImpl.VelSetterImpl
           
 
Field Summary
private static Introspector introspector
          the default Velocity introspector
private  RuntimeLogger rlog
          Our runtime logger.
 
Constructor Summary
UberspectImpl()
           
 
Method Summary
 java.util.Iterator getIterator(java.lang.Object obj, Info i)
          To support iteratives - #foreach()
 VelMethod getMethod(java.lang.Object obj, java.lang.String methodName, java.lang.Object[] args, Info i)
          Method
 VelPropertyGet getPropertyGet(java.lang.Object obj, java.lang.String identifier, Info i)
          Property getter
 VelPropertySet getPropertySet(java.lang.Object obj, java.lang.String identifier, java.lang.Object arg, Info i)
          Property setter
 void init()
          init - does nothing - we need to have setRuntimeLogger called before getting our introspector, as the default vel introspector depends upon it.
 void setRuntimeLogger(RuntimeLogger runtimeLogger)
          Sets the runtime logger - this must be called before anything else besides init() as to get the logger.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

rlog

private RuntimeLogger rlog
Our runtime logger.

introspector

private static Introspector introspector
the default Velocity introspector
Constructor Detail

UberspectImpl

public UberspectImpl()
Method Detail

init

public void init()
          throws java.lang.Exception
init - does nothing - we need to have setRuntimeLogger called before getting our introspector, as the default vel introspector depends upon it.
Specified by:
init in interface Uberspect

setRuntimeLogger

public void setRuntimeLogger(RuntimeLogger runtimeLogger)
Sets the runtime logger - this must be called before anything else besides init() as to get the logger. Makes the pull model appealing...
Specified by:
setRuntimeLogger in interface UberspectLoggable

getIterator

public java.util.Iterator getIterator(java.lang.Object obj,
                                      Info i)
                               throws java.lang.Exception
To support iteratives - #foreach()
Specified by:
getIterator in interface Uberspect

getMethod

public VelMethod getMethod(java.lang.Object obj,
                           java.lang.String methodName,
                           java.lang.Object[] args,
                           Info i)
                    throws java.lang.Exception
Method
Specified by:
getMethod in interface Uberspect

getPropertyGet

public VelPropertyGet getPropertyGet(java.lang.Object obj,
                                     java.lang.String identifier,
                                     Info i)
                              throws java.lang.Exception
Property getter
Specified by:
getPropertyGet in interface Uberspect

getPropertySet

public VelPropertySet getPropertySet(java.lang.Object obj,
                                     java.lang.String identifier,
                                     java.lang.Object arg,
                                     Info i)
                              throws java.lang.Exception
Property setter
Specified by:
getPropertySet in interface Uberspect


Copyright © 2002 Apache Software Foundation. All Rights Reserved.