org.xwiki.velocity.introspection
Class MethodArgumentsUberspector
java.lang.Object
org.apache.velocity.util.introspection.UberspectImpl
org.xwiki.velocity.introspection.AbstractChainableUberspector
org.xwiki.velocity.introspection.MethodArgumentsUberspector
- All Implemented Interfaces:
- org.apache.velocity.util.introspection.Uberspect, org.apache.velocity.util.introspection.UberspectLoggable, org.apache.velocity.util.RuntimeServicesAware, ChainableUberspector
public class MethodArgumentsUberspector
- extends AbstractChainableUberspector
- implements org.apache.velocity.util.RuntimeServicesAware
Chainable Velocity Uberspector that tries to convert method arguments to formal parameter types when the passed
arguments don't match the method signature. In other words, it looks for a method matching the passed arguments and
if none is found then it tries the convert the arguments to match the available method signatures (the available
methods with the same name and the same number of parameters but with different parameter types). E.g.:
$obj.someMethod('VALUE')
// will forward to
obj.someMethod(SomeEnum.VALUE)
// if obj has someMethod(SomeEnum) and not someMethod(String)
- Since:
- 4.1M2
- Version:
- $Id: b5069ae9d5f8de1601c5cef3a610e693f1256fb5 $
- See Also:
ChainableUberspector
| Nested classes/interfaces inherited from class 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 |
| Fields inherited from class org.apache.velocity.util.introspection.UberspectImpl |
introspector, log |
|
Method Summary |
org.apache.velocity.util.introspection.VelMethod |
getMethod(Object obj,
String methodName,
Object[] args,
org.apache.velocity.util.introspection.Info i)
|
void |
setRuntimeServices(org.apache.velocity.runtime.RuntimeServices runtimeServices)
|
| Methods inherited from class org.apache.velocity.util.introspection.UberspectImpl |
setLog, setRuntimeLogger |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodArgumentsUberspector
public MethodArgumentsUberspector()
setRuntimeServices
public void setRuntimeServices(org.apache.velocity.runtime.RuntimeServices runtimeServices)
- Specified by:
setRuntimeServices in interface org.apache.velocity.util.RuntimeServicesAware
getMethod
public org.apache.velocity.util.introspection.VelMethod getMethod(Object obj,
String methodName,
Object[] args,
org.apache.velocity.util.introspection.Info i)
throws Exception
- Specified by:
getMethod in interface org.apache.velocity.util.introspection.Uberspect- Overrides:
getMethod in class AbstractChainableUberspector
- Throws:
Exception
Copyright © 2004-2013 XWiki. All Rights Reserved.