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 classUberspectImpl.VelGetterImplstatic classUberspectImpl.VelMethodImplImplementation of VelMethodstatic classUberspectImpl.VelSetterImpl
-
Field Summary
Fields Modifier and Type Field Description protected TypeConversionHandlerconversionHandlerthe conversion handlerprotected Introspectorintrospectorthe default Velocity introspectorprotected org.slf4j.LoggerlogOur runtime logger.protected RuntimeServicesrsvcruntime services
-
Constructor Summary
Constructors Constructor Description UberspectImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TypeConversionHandlergetConversionHandler()IteratorgetIterator(Object obj, Info i)To support iterative objects used in a#foreach()loop.VelMethodgetMethod(Object obj, String methodName, Object[] args, Info i)MethodVelPropertyGetgetPropertyGet(Object obj, String identifier, Info i)Property getterVelPropertySetgetPropertySet(Object obj, String identifier, Object arg, Info i)Property settervoidinit()init - generates the Introspector.voidsetLog(org.slf4j.Logger log)Deprecated.logger is now set by default to the namespace logger "velocity.rendering".voidsetRuntimeServices(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:
setRuntimeServicesin 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:
getIteratorin interfaceUberspect- Parameters:
obj- The iterative object.i- Info about the object's location.- Returns:
- An
Iteratorobject.
-
getPropertyGet
public VelPropertyGet getPropertyGet(Object obj, String identifier, Info i)
Property getter- Specified by:
getPropertyGetin 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:
getPropertySetin interfaceUberspect- Parameters:
obj-identifier-arg-i-- Returns:
- A Velocity Setter method.
-
-