org.apache.velocity.util.introspection
Class UberspectImpl

java.lang.Object
  extended byorg.apache.velocity.util.introspection.UberspectImpl
All Implemented Interfaces:
Uberspect, UberspectLoggable

public class UberspectImpl
extends Object
implements Uberspect, UberspectLoggable

Implementation of Uberspect to provide the default introspective functionality of Velocity

Version:
$Id: UberspectImpl.java 440737 2006-09-06 15:37:44Z henning $
Author:
Geir Magnusson Jr., Henning P. Schmiedehausen

Nested Class Summary
static class UberspectImpl.VelGetterImpl
           
static class UberspectImpl.VelMethodImpl
          Implementation of VelMethod
static class UberspectImpl.VelSetterImpl
           
 
Field Summary
protected  Introspector introspector
          the default Velocity introspector
 
Constructor Summary
UberspectImpl()
           
 
Method Summary
 Iterator getIterator(Object obj, Info i)
          To support iterative objects used in a #foreach() loop.
 VelMethod getMethod(Object obj, String methodName, Object[] args, Info i)
          Method
 VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
          Property getter
 VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i)
          Property setter
 void init()
          init - generates the Introspector.
 void setLog(Log log)
          Sets the runtime logger - this must be called before anything else.
 void setRuntimeLogger(RuntimeLogger runtimeLogger)
          Deprecated. Use setLog(Log log) instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

introspector

protected Introspector introspector
the default Velocity introspector

Constructor Detail

UberspectImpl

public UberspectImpl()
Method Detail

init

public void init()
init - generates the Introspector. As the setup code makes sure that the log gets set before this is called, we can initialize the Introspector using the log object.

Specified by:
init in interface Uberspect

setLog

public void setLog(Log log)
Sets the runtime logger - this must be called before anything else.

Specified by:
setLog in interface UberspectLoggable
Parameters:
log - The logger instance to use.

setRuntimeLogger

public void setRuntimeLogger(RuntimeLogger runtimeLogger)
Deprecated. Use setLog(Log log) instead.

Specified by:
setRuntimeLogger in interface UberspectLoggable

getIterator

public Iterator getIterator(Object obj,
                            Info i)
                     throws Exception
To support iterative objects used in a #foreach() loop.

Specified by:
getIterator in interface Uberspect
Parameters:
obj - The iterative object.
i - Info about the object's location.
Throws:
Exception

getMethod

public VelMethod getMethod(Object obj,
                           String methodName,
                           Object[] args,
                           Info i)
                    throws Exception
Method

Specified by:
getMethod in interface Uberspect
Throws:
Exception

getPropertyGet

public VelPropertyGet getPropertyGet(Object obj,
                                     String identifier,
                                     Info i)
                              throws Exception
Property getter

Specified by:
getPropertyGet in interface Uberspect
Throws:
Exception

getPropertySet

public VelPropertySet getPropertySet(Object obj,
                                     String identifier,
                                     Object arg,
                                     Info i)
                              throws Exception
Property setter

Specified by:
getPropertySet in interface Uberspect
Throws:
Exception


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.