Class UberspectImpl
java.lang.Object
org.apache.velocity.util.introspection.UberspectImpl
- All Implemented Interfaces:
Uberspect,UberspectLoggable
- Direct Known Subclasses:
AbstractChainableUberspector,SecureUberspector
Implementation of Uberspect to provide the default introspective
functionality of Velocity
- Version:
- $Id: UberspectImpl.java 898032 2010-01-11 19:51:03Z nbubna $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classImplementation of VelMethodstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Introspectorthe default Velocity introspectorprotected LogOur runtime logger. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIterator(Object obj, Info i) To support iterative objects used in a#foreach()loop.MethodgetPropertyGet(Object obj, String identifier, Info i) Property gettergetPropertySet(Object obj, String identifier, Object arg, Info i) Property settervoidinit()init - generates the Introspector.voidSets the runtime logger - this must be called before anything else.voidsetRuntimeLogger(RuntimeLogger runtimeLogger) Deprecated.Use setLog(Log log) instead.
-
Field Details
-
log
Our runtime logger. -
introspector
the default Velocity introspector
-
-
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. -
setLog
Sets the runtime logger - this must be called before anything else.- Specified by:
setLogin interfaceUberspectLoggable- Parameters:
log- The logger instance to use.- Since:
- 1.5
-
setRuntimeLogger
Deprecated.Use setLog(Log log) instead.- Specified by:
setRuntimeLoggerin interfaceUberspectLoggable- Parameters:
runtimeLogger-
-
getIterator
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. - Throws:
Exception
-
getMethod
Method -
getPropertyGet
Property getter- Specified by:
getPropertyGetin interfaceUberspect- Parameters:
obj-identifier-i-- Returns:
- A Velocity Getter Method.
- Throws:
Exception
-
getPropertySet
public VelPropertySet getPropertySet(Object obj, String identifier, Object arg, Info i) throws Exception Property setter- Specified by:
getPropertySetin interfaceUberspect- Parameters:
obj-identifier-arg-i-- Returns:
- A Velocity Setter method.
- Throws:
Exception
-