Class UberspectImpl
java.lang.Object
org.apache.velocity.util.introspection.UberspectImpl
- All Implemented Interfaces:
Uberspect
,RuntimeServicesAware
- Direct Known Subclasses:
AbstractChainableUberspector
,SecureUberspector
Implementation of Uberspect to provide the default introspective
functionality of Velocity
- Version:
- $Id$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Implementation of VelMethodstatic class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected TypeConversionHandler
the conversion handlerprotected Introspector
the default Velocity introspectorprotected org.slf4j.Logger
Our runtime logger.protected RuntimeServices
runtime services -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIterator
(Object obj, Info i) To support iterative objects used in a#foreach()
loop.Methodprivate Converter<?>[]
getNeededConverters
(Type[] expected, Object[] provided) get the list of needed converters to adapt passed argument types to method typesgetPropertyGet
(Object obj, String identifier, Info i) Property gettergetPropertySet
(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
sets the runtime services
-
Field Details
-
log
protected org.slf4j.Logger logOur runtime logger. -
introspector
the default Velocity introspector -
conversionHandler
the conversion handler -
rsvc
runtime services
-
-
Constructor Details
-
UberspectImpl
public UberspectImpl()
-
-
Method Details
-
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
-
setRuntimeServices
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
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.
-
getMethod
Method -
getNeededConverters
get the list of needed converters to adapt passed argument types to method types- Returns:
- null if not conversion needed, otherwise an array containing needed converters
-
getPropertyGet
Property getter- Specified by:
getPropertyGet
in interfaceUberspect
- Parameters:
obj
-identifier
-i
-- Returns:
- A Velocity Getter Method.
-
getPropertySet
Property setter- Specified by:
getPropertySet
in interfaceUberspect
- Parameters:
obj
-identifier
-arg
-i
-- Returns:
- A Velocity Setter method.
-