类 WebappUberspector
java.lang.Object
org.apache.velocity.util.introspection.UberspectImpl
org.apache.velocity.util.introspection.AbstractChainableUberspector
org.apache.velocity.tools.view.WebappUberspector
- 所有已实现的接口:
org.apache.velocity.util.introspection.ChainableUberspector,org.apache.velocity.util.introspection.Uberspect,org.apache.velocity.util.RuntimeServicesAware
public class WebappUberspector
extends org.apache.velocity.util.introspection.AbstractChainableUberspector
This custom uberspector allows getAttribute() and setAttribute() as standard getters and setters for the "request","session" and "application" keys.
It allows VTL statements like:
#set($session.foo = 'youpi') session parameter 'foo' has value: $session.foo
This uberspector requires Velocity 1.6+ ; to use it, you must specify org.apache.velocity.tools.view.WebappUberspector
as the last uberspector to the runtime.introspector.uberspect property in you velocity.properties file.
For instance:
runtime.introspector.uberspect = org.apache.velocity.util.introspection.UberspectImpl,org.apache.velocity.tools.view.WebappUberspector
- 版本:
- $Id: WebappUberspector.java $
- 作者:
- Claude Brisson
-
嵌套类概要
嵌套类修饰符和类型类说明classExecutor for getAttribute(name) method.classExecutor for setAttribute(name,value) method从类继承的嵌套类/接口 org.apache.velocity.util.introspection.UberspectImpl
org.apache.velocity.util.introspection.UberspectImpl.VelGetterImpl, org.apache.velocity.util.introspection.UberspectImpl.VelMethodImpl, org.apache.velocity.util.introspection.UberspectImpl.VelSetterImpl -
字段概要
从类继承的字段 org.apache.velocity.util.introspection.AbstractChainableUberspector
inner从类继承的字段 org.apache.velocity.util.introspection.UberspectImpl
conversionHandler, introspector, log, rsvc -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明org.apache.velocity.util.introspection.VelPropertyGetgetPropertyGet(Object obj, String identifier, org.apache.velocity.util.introspection.Info i) Property getterorg.apache.velocity.util.introspection.VelPropertySetgetPropertySet(Object obj, String identifier, Object arg, org.apache.velocity.util.introspection.Info i) Property settervoidinit()init method从类继承的方法 org.apache.velocity.util.introspection.AbstractChainableUberspector
getIterator, getMethod, wrap从类继承的方法 org.apache.velocity.util.introspection.UberspectImpl
getConversionHandler, setLog, setRuntimeServices
-
构造器详细资料
-
WebappUberspector
public WebappUberspector()
-
-
方法详细资料
-
getPropertyGet
public org.apache.velocity.util.introspection.VelPropertyGet getPropertyGet(Object obj, String identifier, org.apache.velocity.util.introspection.Info i) Property getter- 指定者:
getPropertyGet在接口中org.apache.velocity.util.introspection.Uberspect- 覆盖:
getPropertyGet在类中org.apache.velocity.util.introspection.AbstractChainableUberspector- 参数:
obj- target objectidentifier- property keyi- tool info- 返回:
- A Velocity Getter Method.
-
init
public void init()init method- 指定者:
init在接口中org.apache.velocity.util.introspection.Uberspect- 覆盖:
init在类中org.apache.velocity.util.introspection.AbstractChainableUberspector
-
getPropertySet
public org.apache.velocity.util.introspection.VelPropertySet getPropertySet(Object obj, String identifier, Object arg, org.apache.velocity.util.introspection.Info i) Property setter- 指定者:
getPropertySet在接口中org.apache.velocity.util.introspection.Uberspect- 覆盖:
getPropertySet在类中org.apache.velocity.util.introspection.AbstractChainableUberspector- 参数:
obj- target objectidentifier- property keyarg- value to seti- tool info- 返回:
- A Velocity Setter method.
-