Class UberspectImpl
- java.lang.Object
-
- org.apache.velocity.util.introspection.UberspectImpl
-
- All Implemented Interfaces:
Uberspect
,RuntimeServicesAware
- Direct Known Subclasses:
AbstractChainableUberspector
,SecureUberspector
public class UberspectImpl extends Object implements Uberspect, RuntimeServicesAware
Implementation of Uberspect to provide the default introspective functionality of Velocity- Version:
- $Id$
- Author:
- Geir Magnusson Jr., Henning P. Schmiedehausen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UberspectImpl.VelGetterImpl
static class
UberspectImpl.VelMethodImpl
Implementation of VelMethodstatic class
UberspectImpl.VelSetterImpl
-
Field Summary
Fields Modifier and Type Field Description protected TypeConversionHandler
conversionHandler
the conversion handlerprotected Introspector
introspector
the default Velocity introspectorprotected org.slf4j.Logger
log
Our runtime logger.protected RuntimeServices
rsvc
runtime services
-
Constructor Summary
Constructors Constructor Description UberspectImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TypeConversionHandler
getConversionHandler()
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)
MethodVelPropertyGet
getPropertyGet(Object obj, String identifier, Info i)
Property getterVelPropertySet
getPropertySet(Object obj, String identifier, Object arg, Info i)
Property settervoid
init()
init - generates the Introspector.void
setLog(org.slf4j.Logger log)
Deprecated.logger is now set by default to the namespace logger "velocity.rendering".void
setRuntimeServices(RuntimeServices rs)
sets the runtime services
-
-
-
Field Detail
-
log
protected org.slf4j.Logger log
Our runtime logger.
-
introspector
protected Introspector introspector
the default Velocity introspector
-
conversionHandler
protected TypeConversionHandler conversionHandler
the conversion handler
-
rsvc
protected RuntimeServices rsvc
runtime services
-
-
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.
-
getConversionHandler
public TypeConversionHandler getConversionHandler()
-
setRuntimeServices
public void setRuntimeServices(RuntimeServices rs)
sets the runtime services- Specified by:
setRuntimeServices
in interfaceRuntimeServicesAware
- Parameters:
rs
- runtime services
-
setLog
public void setLog(org.slf4j.Logger log)
Deprecated.logger is now set by default to the namespace logger "velocity.rendering".Sets the runtime logger - this must be called before anything else.- Parameters:
log
- The logger instance to use.- Since:
- 1.5
-
getIterator
public Iterator getIterator(Object obj, Info i)
To support iterative objects used in a#foreach()
loop.- Specified by:
getIterator
in interfaceUberspect
- Parameters:
obj
- The iterative object.i
- Info about the object's location.- Returns:
- An
Iterator
object.
-
getPropertyGet
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
Property getter- Specified by:
getPropertyGet
in interfaceUberspect
- Parameters:
obj
-identifier
-i
-- Returns:
- A Velocity Getter Method.
-
getPropertySet
public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i)
Property setter- Specified by:
getPropertySet
in interfaceUberspect
- Parameters:
obj
-identifier
-arg
-i
-- Returns:
- A Velocity Setter method.
-
-